reportSAM: Report the results of statistical age models
Description
Return a plot and a list that summaries the posterior density distributions of the parameters, the history of simulations and the auto-correlations of those parameters. Also return the inferences.Usage
reportSAM(x, burn = NULL, thin = NULL, plot = TRUE, outfile = NULL, ...)
Arguments
x
required: an object of class "mcAgeModels", which is produced by function mcFMM or mcMAM burn
numeric(with default): the number of simulations to be discarded, i.e. the initial, non-stationary portion of the chains, default burn=floor(nsim/5L) thin
numeric(with default): only one value from each portion that constains every thin values is retained, default thin=5 plot
logical(with default): plot the results or not outfile
character(optional): if specified, simulated chains will be written to a file named "outfile" in ".csv" format and will be saved to the current work directory Value
- Return list that contains following elements:
- parsestimates and their standard errors
- maxlikthe corresponding logged maximum likelihood value
Details
The numbers of "burn-in" and "thining" are used to refine the simulated chains in order to obtain more reliable inference. The initial portion of the chains may not sufficiently close to stationarity and
need to be discarded. Where the "thining" protocol is used to reduce the posterior correlation between parameters.References
Lunn, D., Jackson, C., Best, N., Thomas, A., Spiegelhalter, D., 2013. The BUGS Book: A Practical Introduction to Bayesian Analysis. Journal of Statistical Software,
52, pp. 1-4.