View source: R/perfectSample.R
perfectSample | R Documentation |
Samples an MTD Markov Chain from the stationary distribution.
perfectSample(MTD, N = NULL)
MTD |
An MTD object, see |
N |
The sample size. If |
This perfect sample algorithm requires that the MTD model has
an independent distribution (p0) with a positive weight (i.e., MTD$lambdas["lam0"]>0
which
means \lambda_0>0
).
Returns a sample from an MTD model (the first element is the most recent).
perfectSample(MTDmodel(Lambda=c(1,4), A = c(0,2)), N = 200 )
perfectSample(MTDmodel(Lambda=c(2,5), A = c(1,2,3)), N = 1000 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.