Get residuals from an lm.spike
object.
1 2 3 4 5 6 
object 
An object of class 
burn 
The number of MCMC iterations in the object to be discarded as burnin. 
mean.only 
Logical. If 
... 
Unused, but present for compatibility with generic

The posterior distribution (or posterior mean) of residuals from
the model object. If mean.only
is TRUE
then the return
value is the vector of residuals, otherwise the return value is a
matrix, with rows corresponding to MCMC iterations, and columns to
individual observations.
Steven L. Scott
lm.spike
SpikeSlabPrior
summary.lm.spike
plot.lm.spike
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  niter < 1000
n < 100
p < 10
ngood < 3
x < cbind(1, matrix(rnorm(n * (p1)), nrow=n))
beta < rep(0, p)
good < sample(1:p, ngood)
beta[good] < rnorm(ngood)
sigma < 1
y < rnorm(n, x %*% beta, sigma)
model < lm.spike(y ~ x  1, niter=niter)
plot(model)
residuals(model)
residuals(model, mean.only = TRUE)

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.