MTDmodel {hdMTD} | R Documentation |
Creates a Mixture Transition Distribution (MTD) Model
Description
Generates an MTD model as an object of class MTD
given a set of parameters.
Usage
MTDmodel(
Lambda,
A,
lam0 = NULL,
lamj = NULL,
pj = NULL,
p0 = NULL,
single_matrix = FALSE,
indep_part = TRUE
)
Arguments
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 |
Details
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.
Value
A list of class MTD
containing:
P
The transition probability matrix of the MTD model.
lambdas
A vector with MTD weights (
lam0
andlamj
).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.
Examples
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)