summary.gvs: Some diagnostics for fitted dose-response models

View source: R/summary.gvs.R

summary.gvsR Documentation

Some diagnostics for fitted dose-response models

Description

Summary method for objects of class gvs, as returned by gibbs. Produces a text-based summary of: (1) effective sample sizes, (2) acceptance rates, (3) model convergence, and (4) posterior model probabilities. Note that gibbs does not implement covariate selection. As a result, posterior inclusion probabilities (PIPs) are not returned here, contrary to summary.rjtrace.

Usage

## S3 method for class 'gvs'
summary(
  gvs.obj,
  eff.n = TRUE,
  accept.rate = TRUE,
  convergence = TRUE,
  gelman.rubin = 1.1,
  model.ranks = TRUE,
  n.top = NULL
)

Arguments

gvs.obj

Input trace object, as returned by gibbs.

eff.n

Logical. If TRUE, returns estimates of the effective sample size for each model parameter.

accept.rate

Logical. If TRUE, returns the acceptance rate (calculated after burn-in) for each model parameter.

convergence

Logical. If TRUE, assesses convergence using the multivariate potential scale reduction factor (Gelman-Rubin statistic), as implemented in gelman.diag.

gelman.rubin

Threshold for determining convergence based on the Gelman-Rubin statistic. Defaults to 1.1.

model.ranks

Logical. If TRUE, returns a summary of posterior model probabilities and associated model rankings.

n.top

Number of top-ranking models to display when model.ranks = TRUE.

Value

A detailed summary, printed to the R console.

Author(s)

Phil J. Bouchet

See Also

simulate_data example_brs summary.brsdata

Examples

## Not run: 
library(espresso)

# Simulate data for two species
mydat <- simulate_data(n.species = 2,
                       n.whales = 16,
                       min.trials = 1,
                       max.trials = 3,
                       covariates = list(exposed = c(0, 5), range = 0.5),
                       mu = c(101, 158),
                       phi = 20,
                       sigma = 20,
                       Lc = c(60, 65),
                       Rc = c(210, 211),
                       seed = 58697)
summary(mydat)

# Model selection by GVS
gvs.model <- gibbs(dat = mydat,
             random.effects = FALSE,
             include.covariates = FALSE,
             mcmc.n = 1000,
             burnin = 500)

summary(gvs.model)

## End(Not run)

pjbouchet/espresso documentation built on July 27, 2024, 12:31 p.m.