ppsample {bspec}R Documentation

Posterior predictive sampling

Description

Draws a sample from the posterior predictive distribution specified by the supplied bspec object.

Usage

ppsample(x, ...)
## S3 method for class 'bspec'
ppsample(x, start=x$start, ...)

Arguments

x

a bspec object specifying the posterior distribution from which to sample.

start

the start time of the resulting time series.

...

currently unused.

Value

A time series (ts) object of the same kind (with respect to sampling rate and sample size) as the data the posterior distribution is based on.

Author(s)

Christian Roever, christian.roever@med.uni-goettingen.de

See Also

bspec, sample.bspec

Examples


par(mfrow=c(2,1))
plot(lh, main="'lh' data")
plot(ppsample(bspec(lh)), main="posterior predictive sample")
par(mfrow=c(1,1))

[Package bspec version 1.6 Index]