perfectSample {hdMTD} | R Documentation |
Perfectly samples an MTD Markov chain
Description
Samples an MTD Markov Chain from the stationary distribution.
Usage
perfectSample(MTD, N = NULL)
Arguments
MTD |
An MTD object, see |
N |
The sample size. If |
Details
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
).
Value
Returns a sample from an MTD model (the first element is the most recent).
Examples
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 )
[Package hdMTD version 0.1.0 Index]