View source: R/SimHMMGaussianInv.R
SimHMMGaussianInv | R Documentation |
Generates a univariate regime-switching random walk with Gaussian regimes starting from a given state eta0, using the inverse method from noise u.Can be useful when generating multiple time series.
SimHMMGaussianInv(u, mu, sigma, Q, eta0)
u |
series of uniform i.i.d. series (n x 1); |
mu |
vector of means for each regime (r x 1); |
sigma |
vector of standard deviations for each regime (r x 1); |
Q |
Transition probality matrix (r x r); |
eta0 |
Initial value for the regime; |
x |
Simulated Data |
eta |
Probability of regimes |
Bouchra R Nasri and Bruno N Rémillard, January 31, 2019
Nasri & Remillard (2019). Copula-based dynamic models for multivariate time series. JMVA, vol. 172, 107–121.
Q <- matrix(c(0.8, 0.3, 0.2, 0.7),2,2)
set.seed(1)
u <-runif(250)
mu <- c(-0.3 ,0.7)
sigma <- c(0.15,0.05);
eta0=1
x <- SimHMMGaussianInv(u,mu,sigma,Q,eta0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.