Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## [5e69f8]: man / model.samples.Rd Maximize Restore History

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 \name{jags.samples} \alias{jags.samples} %- Also NEED an '\alias' for EACH other topic documented here. \title{Generate posterior samples} \description{ Function to extract random samples from the posterior distribution of the parameters of a \code{jags} model. } \usage{ jags.samples(model, variable.names, n.iter, thin = 1, type="trace", ...) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{model}{a jags model object} \item{variable.names}{a character vector giving the names of variables to be monitored} \item{n.iter}{number of iterations to monitor} \item{thin}{thinning interval for monitors} \item{type}{type of monitor} \item{...}{optional arguments passed to the update method for jags model objects} } \details{ The \code{jags.samples} function creates monitors for the given variables, runs the model for \code{n.iter} iterations and returns the monitored samples. } \value{ A list of \code{mcarray} objects, with one element for each element of the \code{variable.names} argument. } \examples{ data(LINE) LINE\$recompile() LINE.samples <- jags.samples(LINE, c("alpha","beta","sigma"), n.iter=1000) LINE.samples } \author{Martyn Plummer} \seealso{\code{\link{jags.model}}, \code{\link{coda.samples}}} \keyword{models}