summary.logit.spike: Numerical summaries of the results from a spike and slab...

View source: R/logit.spike.R

summary.logit.spikeR Documentation

Numerical summaries of the results from a spike and slab logistic regression.

Description

Produces a summary of the marginal distribution of model coefficients from a spike and slab logistic regression.

Usage

## S3 method for class 'logit.spike'
summary(object,
        burn = 0,
        order = TRUE,
        cutpoint.scale = c("probability", "logit"),
        cutpoint.basis = c("sample.size", "equal.range"),
        number.of.buckets = 10,
        coefficients = TRUE,
        ...)

## S3 method for class 'probit.spike'
summary(object,
        burn = 0,
        order = TRUE,
        cutpoint.scale = c("probability", "probit"),
        cutpoint.basis = c("sample.size", "equal.range"),
        number.of.buckets = 10,
        coefficients = TRUE,
        ...)

Arguments

object

An object of class logit.spike or probit.spike.

burn

The number of MCMC iterations in the ojbect to be discarded as burn-in.

order

Logical. If TRUE then the coefficients are presented in order of their posterior inclusion probabilities. Otherwise the order of the coefficients is the same as in object.

cutpoint.scale

The scale that should be used to determine the buckets for the comparison of predicted and actual probabilities.

cutpoint.basis

How should the buckets be determined in the comparison of predicted to actual probabilities? If "sample.sample", then each bucket contains the same fraction of data. If "equal.range" then the buckets are formed by parititioning the range of the predicted probabilities, and each bucket occupies the same amount of space on the real line.

number.of.buckets

The number of buckets to use in the comparison of predicted to actual probabilities.

coefficients

Logical value indicating whether the coefficient summary should be included in the output. It can be useful to suppress the coefficients if there are many of them.

...

Unused. Present for compatibility with generic summary().

Value

Returns a list with the following elements

  • coefficients: A five-column matrix summarizing the model coefficients, produced by SummarizeSpikeSlabCoefficients.

  • null.log.likelihood: The log likelihood of the null binomial model evaluated at the MLE.

  • mean.log.likelihood: The average value of log likelihood visited by the sampler.

  • max.log.likelihood: The largest log likelihood value visited by the sampler.

  • deviance.r2: The deviance R-square obtained by taking (null.likelihood - mean.log.likelihood) / null.log.likelihood

  • deviance.r2.distribution: The value of the deviance R-square statistic at each point visited by the MCMC chain. This is not printed by the print method.

  • predicted.vs.actualA table obtained by paritioning the data into buckets, and comparing the aveage predicted probability with the empirical success rate in each bucket.

Author(s)

Steven L. Scott

See Also

logit.spike probit.spike SpikeSlabPrior

Examples

  n <- 100
  p <- 10
  ngood <- 3
  niter <- 1000

  x <- cbind(1, matrix(rnorm(n * (p-1)), nrow=n))
  beta <- c(rnorm(ngood), rep(0, p - ngood))
  prob <- plogis(x %*% beta)
  y <- runif(n) < prob
  x <- x[,-1]
  model <- logit.spike(y ~ x, niter=niter)
  summary(model)

BoomSpikeSlab documentation built on May 28, 2022, 1:11 a.m.