plot.rjtrace.Rd
Generate trace, density, and autocorrelation plots from an rjtrace
object.
# S3 method for rjtrace plot( rj.obj, param.name = NULL, phase = NULL, type = "both", adjust = 2, gvals = NULL, priors = NULL, covariates.incl = FALSE, autocorr = FALSE, individual = TRUE )
rj.obj | rjMCMC trace object of class |
---|---|
param.name | Parameter name(s). Defaults to |
phase | Integer. If used, will only generate plots for the parameters of the monophasic (1) or biphasic (2) model. |
covariates.incl | Logical. If |
autocorr | Logical. Whether to output chain autocorrelation plots. |
individual | Logical. If |
Adapted from Casey Youngflesh's function MCMCtrace
.
Phil J. Bouchet
if (FALSE) { library(espresso) # Import the example data, excluding species with sample sizes < 5 # and considering the sonar covariate mydat <- read_data(file = NULL, min.N = 5, covariates = "sonar") summary(mydat) # Configure the sampler mydat.config <- configure_rjMCMC(dat = mydat, model.select = TRUE, covariate.select = FALSE, function.select = FALSE, n.rep = 100) summary(mydat.config) # Run the reversible jump MCMC rj <- run_rjMCMC(dat = mydat.config, n.chains = 2, n.burn = 100, n.iter = 100, do.update = FALSE) # Burn and thin rj.trace <- trace_rjMCMC(rj.dat = rj) # Get density and trace plots plot(rj.trace) }