View source: R/summary.rjtrace.R
summary.rjtrace | R Documentation |
Summary method for objects of class rjtrace
, as returned by trace_rjMCMC
. Produces a text-based summary of: (1) effective sample sizes, (2) acceptance rates, (3) model convergence, (4) posterior model probabilities, and (5) posterior inclusion probabilities (PIPs) for contextual covariates (where appropriate).
## S3 method for class 'rjtrace'
summary(
rj.obj,
eff.n = TRUE,
accept.rate = TRUE,
convergence = TRUE,
gelman.rubin = 1.1,
model.ranks = TRUE,
n.top = 10,
southall.2019 = TRUE,
covariate.prob = TRUE,
ff.prob = TRUE,
x.off = 0.1,
rmd = FALSE,
do.plot = TRUE
)
rj.obj |
Input rjMCMC object, as returned by |
eff.n |
Logical. If |
accept.rate |
Logical. If |
convergence |
Logical. If |
gelman.rubin |
Threshold for determining convergence based on the Gelman-Rubin statistic. Defaults to |
model.ranks |
Logical. If |
n.top |
Number of top-ranking models to display when |
southall.2019 |
Logical. Whether to produce a tile plot showing species groupings, as identified in \insertCiteSouthall2019;textualespresso. This is only relevant if real-world BRS data are being analysed (and therefore, |
covariate.prob |
Logical. If |
ff.prob |
Logical. If |
x.off |
Offset for probability values in tile plots. |
rmd |
Logical. This is used to create a different layout of plots when exporting results using |
do.plot |
Logical. If |
A detailed summary, printed to the R console.
Phil J. Bouchet
simulate_data
example_brs
summary.rjdata
## Not run:
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)
summary(rj)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.