Learn R Programming

conting (version 1.4)

summary.bcct: Summary of bcct and bict Objects

Description

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

Usage

## 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 p
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,
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.
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 posterio
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.

Value

  • The function summary.bcct will return an object of class "sbcct" which is a list with the following components.
  • BETAAn 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.
  • MODELA vector of length n.sample giving the samlpled model indicators in hexadecimal format.
  • SIGA 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_accA 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_accA 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.
  • priornumA numeric scalar indicating which prior was used: 1 = "UIP", 2 = "SBH".
  • maximal.modAn object of class "glm" giving the fit of the maximal model.
  • IPA p by p matrix giving the inverse of the prior scale matrix for the maximal model.
  • eta.hatA vector of length n (number of cells) giving the posterior mode of the linear predictor under the maximal model.
  • saveThe argument save.
  • nameThe argument name.
  • int_statsA 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_statsA 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_statsA 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.
  • Y0An 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_statsA 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.

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.

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.