MTDmodel | R Documentation |
Generates an MTD model as an object of class MTD
given a set of parameters.
MTDmodel(
Lambda,
A,
lam0 = NULL,
lamj = NULL,
pj = NULL,
p0 = NULL,
single_matrix = FALSE,
indep_part = TRUE
)
Lambda |
A numeric vector of positive integers representing the relevant lag set. The elements will be sorted from smallest to greatest. The smallest number represents the latest (most recent) time in the past, and the largest number represents the earliest time in the past. |
A |
A vector with nonnegative integers representing the state space. |
lam0 |
A numeric value in |
lamj |
A numeric vector of weights for the transition probability matrices in |
pj |
A list with |
p0 |
A probability vector for the independent component of the MTD model. If |
single_matrix |
Logical. If |
indep_part |
Logical. If |
The resulting MTD object can be used by functions such as oscillation()
, which retrieves the
model's oscillation, and perfectSample()
, which will sample an MTD Markov chain from its invariant
distribution.
A list of class MTD
containing:
P
The transition probability matrix of the MTD model.
lambdas
A vector with MTD weights (lam0
and lamj
).
pj
A list of stochastic matrices defining conditional transition probabilities.
p0
The independent probability distribution.
Lambda
The vector of relevant lags.
A
The state space.
MTDmodel(Lambda=c(1,3),A=c(4,8,12))
MTDmodel(Lambda=c(2,4,9),A=c(0,1),lam0=0.05,lamj=c(0.35,0.2,0.4),
pj=list(matrix(c(0.5,0.7,0.5,0.3),ncol=2)),p0=c(0.2,0.8),single_matrix=TRUE)
MTDmodel(Lambda=c(2,4,9),A=c(0,1),lam0=0.05,
pj=list(matrix(c(0.5,0.7,0.5,0.3),ncol=2)),single_matrix=TRUE,indep_part=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.