simulate.vlmc {VLMC} | R Documentation |
Simulate from fitted VLMC model – basis of the VLMC bootstrap
simulate.vlmc(x, n, n.start = 64 * x$size["context"], integer.return=FALSE)
x |
typically the result of vlmc(..) . |
n |
non-negative integer, giving the length of the result. |
n.start |
the number of initial values to be discarded (because of initial effects). |
integer.return |
logical; if TRUE , the result will be an
integer vector with values in 0:(k-1) ;
otherwise the resulting vector consists of letters from the alphabet
x$alpha . |
The .Random.seed
is used and updated as with other random
number generation routines such as rbinom
.
Note that if you want to simulate from a given start sequence
x0
, you'd use predict.vlmc(x, x0, type= "response")
— actually not quite yet.
A vector of length n
. Either integer
or
character
, depending on the integer.return
argument, see above.
Martin Maechler
vlmc
and predict.vlmc
.
example(vlmc) simulate.vlmc(vlmc.dt1, 100) simulate.vlmc(vlmc.dt1c01, 100, int = TRUE) # n.start = 0: 1st few observations will resemble the data simulate.vlmc(vlmc.dt1c01, 20, n.start=0, int = TRUE)