ltm_sim {bltm} | R Documentation |
Simulate LTM model
Description
Simulate LTM model using many
Usage
ltm_sim(ns, nk, ni, vmu, mPhi, mSigs, dsig, vd, alpha)
Arguments
ns |
number of times |
nk |
number of covariates |
ni |
number of series |
vmu |
vector mu |
mPhi |
phi diagonal matrix with the parameters |
mSigs |
sigma eta vector |
dsig |
general sigma |
vd |
threshold parameter |
alpha |
intercept |
Value
List containing the generated y, x, beta and thresholded beta.
References
Nakajima, Jouchi, and Mike West. "Bayesian analysis of latent threshold dynamic models." Journal of Business & Economic Statistics 31.2 (2013): 151-164.
Examples
# Generates 10 series, each one with 500 observations and 2 regressors.
d_sim <- ltm_sim(
ns = 500, nk = 2, ni = 10,
vmu = matrix(c(.5,.5), nrow = 2),
mPhi = diag(2) * c(.99, .99),
mSigs = c(.1,.1),
dsig = .15,
vd = matrix(c(.4,.4), nrow = 2),
alpha = 0
)
str(d_sim)
[Package bltm version 0.1.0 Index]