bamlss (version 0.1-2)

samples: Extract Samples

Description

Generic function to extract samples from objects.

Usage

## Generic.
samples(object, ...)

## Method for "bamlss" objects. # S3 method for bamlss samples(object, model = NULL, term = NULL, combine = TRUE, drop = TRUE, burnin = NULL, thin = NULL, ...)

Arguments

object

An object for which samples should be extracted.

model

Character or integer, specifies the model for which samples should be extracted.

term

Character or integer, specifies the term for which samples should be extracted.

combine

Samples stored as a mcmc.list, e.g., when a model is estimated on multiple cores, can be combined into one large sample matrix.

drop

If there is only one model for which samples should be extracted, should the list structure be dropped?

burnin

Integer, specifies the number of samples that should be withdrawn as a burn-in phase.

thin

Integer, specifies the step length of samples that should be extracted, e.g., thin = 10 mean that only every 10th sample is returned.

Other arguments.

See Also

bamlss.

Examples

Run this code
# NOT RUN {
## Generate data.
d <- GAMart()

## Estimate model.
b <- bamlss(num ~ s(x1) + s(x2) + s(x3), data = d)

## Extract samples for "s(x2)".
sa <- samples(b, term = "s(x2)")
head(sa)

## Trace plot.
plot(sa)
# }

Run the code above in your browser using DataCamp Workspace