jags.samples {rjags}R Documentation

Generate posterior samples

Description

Function to extract random samples from the posterior distribution of the parameters of a jags model.

Usage

jags.samples(model, variable.names, n.iter, thin = 1, type="trace", ...)

Arguments

model a jags model object
variable.names a character vector giving the names of variables to be monitored
n.iter number of iterations to monitor
thin thinning interval for monitors
type type of monitor
... optional arguments passed to the update method for jags model objects

Details

The jags.samples function creates monitors for the given variables, runs the model for n.iter iterations and returns the monitored samples.

Value

A list of mcarray objects, with one element for each element of the variable.names argument.

Author(s)

Martyn Plummer

See Also

jags.model, coda.samples


[Package rjags version 1.0.3-8 Index]