Learn R Programming

BoomSpikeSlab (version 0.4.1)

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, ...)

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.
...
Unused. Present for compatibility with generic summary().

Value

  • A five-column matrix with rows representing model coefficients. The first two columns are the posterior mean and standard deviation of each coefficient, including the point mass at zero. The next two columns are the posterior mean and standard deviations conditional on the coefficient being nonzero. The last column is the probability of a nonzero coefficient.

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