ltm_sim function

Simulate LTM model

Simulate LTM model

Simulate LTM model using many

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

Returns

List containing the generated y, x, beta and thresholded beta.

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)

References

Nakajima, Jouchi, and Mike West. "Bayesian analysis of latent threshold dynamic models." Journal of Business & Economic Statistics 31.2 (2013): 151-164.

  • Maintainer: Julio Trecenti
  • License: MIT + file LICENSE
  • Last published: 2019-07-18