summary.logit.spike | R Documentation |
Produces a summary of the marginal distribution of model coefficients from a spike and slab logistic regression.
## 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,
...)
object |
An object of class |
burn |
The number of MCMC iterations in the ojbect to be discarded as burn-in. |
order |
Logical. If |
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(). |
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.actual: A table obtained by paritioning the data into buckets, and comparing the aveage predicted probability with the empirical success rate in each bucket.
Steven L. Scott
logit.spike
probit.spike
SpikeSlabPrior
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.