File: markovchain.R

package info (click to toggle)
r-cran-markovchain 0.8.5-4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,060 kB
  • sloc: cpp: 2,854; sh: 13; makefile: 2
file content (63 lines) | stat: -rw-r--r-- 2,308 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#' @docType package
#' @name markovchain-package
#' @rdname markovchain
#' @title Easy Handling Discrete Time Markov Chains
#'
#' @description The package contains classes and method to create and manage
#'   (plot, print, export for example) discrete time Markov chains (DTMC). In
#'   addition it provide functions to perform statistical (fitting and drawing
#'   random variates) and probabilistic (analysis of DTMC proprieties) analysis
#'   
#' @details 
#' \tabular{ll}{
#'   Package: \tab markovchain\cr
#'   Type: \tab Package\cr
#'   Version: \tab 0.8.2\cr
#'   Date: \tab 2020-01-5\cr
#'   License: \tab GPL-2\cr
#'   Depends: \tab R (>= 3.6.0), methods, expm, matlab, igraph, Matrix\cr
#' }
#' @author 
#' Giorgio Alfredo Spedicato 
#' Maintainer: Giorgio Alfredo Spedicato <spedicato_giorgio@yahoo.it>
#' @references Discrete-Time Markov Models, Bremaud, Springer 1999
#' @keywords package
#' 
#' @examples
#' # create some markov chains
#' statesNames=c("a","b")
#' mcA<-new("markovchain", transitionMatrix=matrix(c(0.7,0.3,0.1,0.9),byrow=TRUE,
#'          nrow=2, dimnames=list(statesNames,statesNames)))
#'          
#' statesNames=c("a","b","c")
#' mcB<-new("markovchain", states=statesNames, transitionMatrix=
#'          matrix(c(0.2,0.5,0.3,0,1,0,0.1,0.8,0.1), nrow=3, 
#'          byrow=TRUE, dimnames=list(statesNames, statesNames)))
#'
#' statesNames=c("a","b","c","d")
#' matrice<-matrix(c(0.25,0.75,0,0,0.4,0.6,0,0,0,0,0.1,0.9,0,0,0.7,0.3), nrow=4, byrow=TRUE)
#' mcC<-new("markovchain", states=statesNames, transitionMatrix=matrice)
#' mcD<-new("markovchain", transitionMatrix=matrix(c(0,1,0,1), nrow=2,byrow=TRUE))
#'
#'
#' #operations with S4 methods
#' mcA^2
#' steadyStates(mcB)
#' absorbingStates(mcB)
#' markovchainSequence(n=20, markovchain=mcC, include=TRUE)
NULL

#' @useDynLib markovchain, .registration = TRUE
#' @import igraph
#' @import Matrix
#' @import methods
#' @import parallel
#' @importFrom utils packageDescription
#' @importFrom Rcpp evalCpp
#' @importFrom RcppParallel RcppParallelLibs
#' @importFrom stats4 plot summary
#' @importFrom matlab zeros find eye size ones
#' @importFrom expm %^% logm
#' @importFrom stats sd rexp chisq.test pchisq predict aggregate
#' @importFrom grDevices colors
NULL