SimulateDMQ {DMQ} | R Documentation |
Simulate from the DMQ model
Description
Approximate simulation from the DMQ model. Allows to simulate quantiles and observations.
Usage
SimulateDMQ(iT, vQ_0, vTau, iTau_star, vPn, ScalingType = "InvSqrt", fSim = NULL)
Arguments
iT |
Number of observations to simulate. |
vQ_0 |
|
vTau |
|
iTau_star |
Integer indicating the position in |
vPn |
|
ScalingType |
|
fSim |
|
Details
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.
Value
A list
with two elements:
vY |
A |
mQ |
A |
Author(s)
Leopoldo Catania
Examples
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")