SimulateDMQ  R Documentation 
Approximate simulation from the DMQ model. Allows to simulate quantiles and observations.
SimulateDMQ(iT, vQ_0, vTau, iTau_star, vPn, ScalingType = "InvSqrt", fSim = NULL)
iT 
Number of observations to simulate. 
vQ_0 

vTau 

iTau_star 
Integer indicating the position in 
vPn 

ScalingType 

fSim 

Given a set of simulated quantiles a Uniform variable drawn. The discretized quantile function is linearly interpoled at the simulated Uniform draw to obtain an observations. When the Uniform draw is outside the range spanned by vTau
a Gaussian quantile function is used. The mean and variance of the Gaussian quantile distribution are set to those implied by the simulated quantiles using the same scheme of MomentsDMQ.
A list
with two elements:
vY 
A 
mQ 
A 
Leopoldo Catania
set.seed(123)
# Simulate 500 observations from the DMQ model.
# Use the percentiles
vTau = seq(0.01, 0.99, 0.01)
# Median as reference quantile
iTau_star = 50
# Standard Gaussian limiting distribution
vQ_0 = qnorm(vTau)
# vector of parameters
vPn = c("phi" = 0.95, "gamma" = 0.10, "alpha" = 0.01, "beta" = 0.7)
lSim = SimulateDMQ(iT = 500, vQ_0, vTau, iTau_star, vPn)
plot.ts(lSim$vY)
plot.ts(lSim$mQ, plot.type = "single")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.