Stores the output of Bayesian variable selection, as produced by
function modelSelection
.
The class extends a list, so all usual methods for lists also work for
msfit
objects, e.g. accessing elements, retrieving names etc.
Methods are provided to compute posterior probabilities, obtaining regression coefficient estimates and posterior intervals (both via Bayesian model averaging and for individual models), and sampling from their posterior distribution, as indicated below.
Typically objects are automatically created by a call to modelSelection
.
Alternatively, objects can be created by calls of the form
new("msfit",x)
where x
is a list with the adequate
elements (see slots).
The class extends a list with elements:
matrix
with posterior samples for the model
indicator. postSample[i,j]==1
indicates that variable j was included in the model in the MCMC
iteration i
postOther
returns posterior samples for parameters other than the model
indicator, i.e. basically hyper-parameters.
If hyper-parameters were fixed in the model specification, postOther
will be empty.
Marginal posterior probability for inclusion of each
covariate. This is computed by averaging marginal post prob for
inclusion in each Gibbs iteration, which is much more accurate than
simply taking colMeans(postSample)
Model with highest posterior probability amongst all those visited
Unnormalized posterior prob of posterior mode (log scale)
Unnormalized posterior prob of each visited model (log scale)
Residual distribution, i.e. argument family
when calling modelSelection
Number of variables
Priors specified when calling modelSelection
For internal use. Stores the response variable,
standardized if center
or scale
were set to
TRUE
For internal use. Stores the covariates,
standardized if center
or scale
were set to
TRUE
For internal use. If center
or
scale
were set to TRUE
, stores the sample mean
and standard deviation of the outcome and covariates
Stores info about the call, the formula used (if any), splines used etc
Obtains posterior means and intervals via Bayesian model averaging
Obtains posterior means and intervals for individual models
Shows estimated posterior inclusion probability for each parameter vs. number of MCMC iterations
Obtains posterior means and intervals for given covariate values. These are posterior intervals for the mean, not posterior predictive intervals for the outcome
signature(object = "msfit")
: Displays general information about the object.
signature(object = "msfit")
: Extracts
posterior model probabilities.
signature(object = "msfit")
: Obtain posterior
samples for regression coefficients.
David Rossell
Johnson VE, Rossell D. Non-Local Prior Densities for Default Bayesian Hypothesis Tests. Journal of the Royal Statistical Society B, 2010, 72, 143-170
Johnson VE, Rossell D. Bayesian model selection in high-dimensional settings. Journal of the American Statistical Association, 107, 498:649-660.
See also modelSelection
and rnlp
.