samples.Rd
Generic function to extract samples from objects.
## 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, coef.only = FALSE, ...)
An object for which samples should be extracted.
Character or integer, specifies the model for which samples should be extracted.
Character or integer, specifies the term for which samples should be extracted.
Samples stored as a mcmc.list
, e.g., when a model is estimated
on multiple cores, can be combined into one large sample matrix.
If there is only one model
for which samples should be extracted, should
the list structure be dropped?
Integer, specifies the number of samples that should be withdrawn as a burn-in phase.
Integer, specifies the step length of samples that should be extracted, e.g.,
thin = 10
mean that only every 10th sample is returned.
Logical, should only samples of model coefficients be returned?
Other arguments.
if (FALSE) ## Generate data.
d <- GAMart()
## Estimate model.
b <- bamlss(num ~ s(x1) + s(x2) + s(x3), data = d)
#> Error in eval(expr, envir, enclos): object 'd' not found
## Extract samples for "s(x2)".
sa <- samples(b, term = "s(x2)")
#> Error in eval(expr, envir, enclos): object 'b' not found
head(sa)
#> Error in eval(expr, envir, enclos): object 'sa' not found
## Trace plot.
plot(sa)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'sa' not found