Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/mskfModelSkeleton.R
This function generates a mskfSkeleton
object to be used with mskfModel
for the specification of a state space model with markovian switching between regimes.
1 2 | mskfModelSkeleton(y, ne = 1, nm = 2, x = NA, ipat = c(W = 1, B = nx, R = 0, c = 2,
H = 2, G = 1, K = 2, p = 2))
|
y |
a univariate or multivariate time series ( |
ne |
number of (underlying/latent) state variables. |
nm |
number of regimes. Should be 2 or larger. |
x |
an (optional) uni- or multivariate time series object of predictors for the measurement equation. |
ipat |
a named numeric vector with entry values 0, 1 or 2. Specifies the model matrices to be used (see Details). |
See mskf
for complete definition of the regime switching state-space model.
The values in ipat
indicate which model matrices (W
,
B
, R
, c
, H
, G
, K
, and
p
; see ‘Value’ below for a description) are used, and whether
or not they contain free parameters: For each named element 0
implies the model matrix is not use; 1
implies the
corresponding model matrix contains fixed values only; 2
implies the model matrix contains free parameters.
An object of class mskf.skeleton
with components
const |
A list wich contains all of the components below for which
|
pattern |
A list wich contains all of the components below for which |
y |
time series |
x |
(optional) predictor time series |
ny |
number of time series in |
nx |
number of time series in |
nt |
length of the time series in |
ne |
number of (underlying/latent) state variables. |
nm |
number of regimes. |
ipat |
|
The
object returned by this function is to be used with mskfModel
for full model specification.
Ellen L. Hamaker and Raoul P. P. P. Grasman
Kim, C.-J. (1994). Dynamic linear models with Markov-switching. Journal of Econometrics, 60, 1-22.
Kim, C.-J., and Nelson, C. R. (1999). State-Space Models with Regime Switching: Classical and Gibbs-Sampling Approaches with Applications. Cambridge, MIT press.
1 | 1:10
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.