Description Usage Arguments Value Author(s) Examples
Extract posterior inclusion probabilities from the models table
1 2 3 | getInclusionProbs(models, modelData,
logMargLiks = models$logMargLik,
logPriors = models$logPrior)
|
models |
the models table (a data frame), the result
from |
modelData |
data used for model estimation |
logMargLiks |
vector of log marginal likelihoods
(defaults to the |
logPriors |
vector of log prior model probabilities
(defaults to the |
a nice matrix with the probabilities for exclusion, linear and non-linear inclusion of the covariates
Daniel Sabanes Bove daniel.sabanesbove@ifspm.uzh.ch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## get some data
attach(longley)
## get model data
md <- modelData(y=Employed,
X=cbind(GNP, Armed.Forces))
## get a list of all possible models with this data
models <- exhaustive(md,
modelPrior="exponential")$models
## attach log prior probabilities
models$logPrior2 <- apply(models[, 1:2],
1L,
getLogModelPrior,
type="exponential",
modelData=md)
stopifnot(all.equal(models$logPrior,
models$logPrior2))
## then we can compute the inclusion probabilities
getInclusionProbs(models=models,
modelData=md)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.