mkv: Markov transition probability matrix

View source: R/mkv.R

mkvR Documentation

Markov transition probability matrix

Description

Compute thre Markov transition probability matrix

Usage

mkv(m, classes = 5, fixed = FALSE, type = 7, ...)

Arguments

m

numerical matrix of n spatial unit ans t time periods

classes

a number of a numeric vector of two or more unique cut points giving the number of intervals into which x will be cut

fixed

logical, if it is TRUE the data are pooled over space and time and the quintiles calculated for the pooled data

type

an integer between 1 and 9 selecting one of the nine quantile algorithms detailed below to be used. For more information see the quantile fuction

...

other argumnt to discret function

Value

a list contaning the markov's trantiiona matrix and the markov's transition probability matrix

Examples

data(us48)
data <- as.data.frame(us48)
pci <- data[,10:90]
rpci <- pci/matrix(1,dim(pci))%*%colMeans(pci)
m<-mkv(rpci)


amvallone/estdaR documentation built on March 30, 2024, 9:38 p.m.