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

1 | ```
SummarizeSpikeSlabCoefficients(beta, burn = 0, order = TRUE)
``` |

`beta` |
A matrix containing MCMC draws of regression coefficients. Each row is an MCMC draw. Each column is a coefficient. |

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

`order` |
Logical. If |

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.

Steven L. Scott

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
n <- 100
p <- 10
ngood <- 3
niter <- 1000
sigma <- 2
x <- cbind(1, matrix(rnorm(n * (p-1)), nrow=n))
beta <- c(rnorm(ngood), rep(0, p - ngood))
y <- rnorm(n, x %*% beta, sigma)
x <- x[,-1]
model <- lm.spike(y ~ x, niter=niter)
plot(model)
plot.ts(model$beta)
hist(model$sigma) ## should be near 8
summary(model)
SummarizeSpikeSlabCoefficients(model$beta, burn = 100)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.