summary.bcct: Summary of 'bcct' and 'bict' Objects

Description Usage Arguments Details Value Note Author(s) References See Also

View source: R/summary.bcct.R

Description

These functions produce summaries of objects of class "bcct" and "bict". They also control how these summaries are printed.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## S3 method for class 'bcct'
summary(object, n.burnin = 0, thin = 1, cutoff = 0.75, statistic = "X2", 
best = NULL, scale = 0.1, prob.level = 0.95, ...)

## S3 method for class 'sbcct'
print(x, ..., digits = max(3, getOption("digits") - 3))

## S3 method for class 'bict'
summary(object, n.burnin = 0, thin = 1, cutoff = 0.75, statistic = "X2", 
best = NULL, scale = 0.1, prob.level = 0.95, ...)

## S3 method for class 'sbict'
print(x, ..., digits = max(3, getOption("digits") - 3))

Arguments

object

An object of class "bcct" or "bict".

x

An object of class "sbcct" or "sbict" produced as a result of a call to the functions summary.bcct or summary.bict, respectively.

n.burnin

An optional argument giving the number of iterations to use as burn-in. The default value is 0.

thin

An optional argument giving the amount of thinning to use, i.e. the computations are based on every thin-th value in the MCMC sample. The default value is 1, i.e. no thinning.

cutoff

An optional argument giving the cutoff posterior probability for displaying posterior summary statistics of the log-linear parameters. Only those log-linear parameters with a posterior probability greater than cutoff will be returned as part of the output. The default value is 0.75.

statistic

An optional argument giving the discrepancy statistic to use for calculating the Bayesian p-value. It can be one of c("X2","FreemanTukey","deviance") which correspond to the different statistics: "X2" = Chi-squared statistic, "FreemanTukey" = Freeman-Tukey statistic, "deviance" = deviance statistic. See Overstall & King (2014), and references therein, for descriptions of these statistics.

best

An optional argument for controlling how the posterior model probabilities are returned as output. The function will return details on the best models with the highest posterior model probabilities. The default value is NULL. If not NULL than this argument takes precedent over scale.

scale

An optional argument for controlling how the posterior model probabilities are returned as output. The function will return details on the models with the posterior model probability larger than scale times the probability of the posterior modal model. The default value is 0.1.

prob.level

An optional argument giving the probability content of the highest posterior density intervals (HPDIs). The default value is 0.95.

digits

An optional argument controling the rounding of output.

...

Arguments to be passed to and from other methods.

Details

The functions summary.bcct and summary.bict rely on the functions inter_stats, mod_probs, bayespval, and (in the case of summary.bict) total_pop. For extra information about the output from these functions, see the associated help files.

The use of thinning is recommended when the number of MCMC iterations and/or the number of log-linear parameters in the maximal model are/is large, which may cause problems with comuter memory storage.

Value

The function summary.bcct will return an object of class "sbcct" which is a list with the following components.

BETA

An n.sample by p matrix containing the sampled values of the log-linear parameters, where p is the number of log-linear parameters in the maximal model. For elements of this matrix which correspond to a log-linear parameter which is not present for the current model a zero is returned.

MODEL

A vector of length n.sample giving the samlpled model indicators in hexadecimal format.

SIG

A vector of length n.sample giving the sampled values for sigma^2 under the Sabanes-Bove & Held prior. If the unit information prior is used then the components of this vector will be one.

rj_acc

A binary vector of the same length as the number of reversible jump moves attempted. A 0 indicates that the proposal was rejected, and a 1 that the proposal was accepted.

mh_acc

A binary vector of the same length as the number of Metropolis-Hastings moves attempted. A 0 indicates that the proposal was rejected, and a 1 that the proposal was accepted.

priornum

A numeric scalar indicating which prior was used: 1 = "UIP", 2 = "SBH".

maximal.mod

An object of class "glm" giving the fit of the maximal model.

IP

A p by p matrix giving the inverse of the prior scale matrix for the maximal model.

eta.hat

A vector of length n (number of cells) giving the posterior mode of the linear predictor under the maximal model.

save

The argument save.

name

The argument name.

int_stats

A list which contains the same components as an object of class "interstat", i.e. summary statistics for the log-linear parameters, see inter_stats.

mod_stats

A list which contains the same components as an object of class "modprobs", i.e. summary statistics for the posterior model probabilities, see mod_probs.

pval_stats

A list which contains the same components as an object of class "pval", i.e. summary statistics for the posterior model probabilities, see bayespval.

The function summary.bict will return an object of class "sbict" which is a list with the same components as an object of class "sbcct" and the following additional components.

Y0

An n.sample by k matrix giving the sampled values of the missing and censored cell counts, where k is the total number of missing and censored cell counts.

tpop_stats

A list which contains the same components as an object of class "totpop", i.e. posterior summary statistics for the total population, see total_pop.

The functions print.sbcct and print.sbict will print out the MCMC acceptance rates, posterior summary statistics for the log-linear parameters, the posterior model probabilities, the Bayesian p-value and (in the case of print.sbict) posterior summary statistics for the total population size.

Note

For examples see the help files for bcct and bict.

Author(s)

Antony M. Overstall A.M.Overstall@soton.ac.uk.

References

Overstall, A.M. & King, R. (2014) conting: An R package for Bayesian analysis of complete and incomplete contingency tables. Journal of Statistical Software, 58 (7), 1–27. http://www.jstatsoft.org/v58/i07/

See Also

bcct, bict, accept_rate, bayespval, inter_stats, mod_probs, total_pop.


conting documentation built on May 1, 2019, 8:47 p.m.