Learn R Programming

BoomSpikeSlab (version 0.5.2)

summary.logit.spike: 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,
        ...)

Arguments

object
An object of class logit.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
number.of.buckets
The number of buckets to use in the comparison of predicted to actual probabilities.
...
Unused. Present for compatibility with generic summary().

Value

  • Returns a list with the following elements
  • 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.

See Also

logit.spike SpikeSlabPrior

Examples

Run this code
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)

Run the code above in your browser using DataLab