Learn R Programming

MCMCpack (version 1.7-1)

topmodels: Shows an ordered list of the most frequently visited models sampled during quantile regression stochastic search variable selection (QR-SSVS).

Description

Given output from quantile regression stochastic search variable selection, this function returns a table of the 'best' models together with their associated empirical posterior probability.

Usage

topmodels(qrssvs, nmodels = 5, abbreviate = FALSE, minlength = 3)

Value

A table with the models and their associated posterior probability. The models are arranged in descending order of probability.

Arguments

qrssvs

An object of class qrssvs. Typically this will be the gamma component of the list returned by SSVSquantreg.

nmodels

The number of models to tabulate.

abbreviate

Logical: should the names of the predictors be abbreviated?

minlength

If abbreviate is set to TRUE, the minimum length of the abbreviations.

Author

Craig Reed

See Also

SSVSquantreg

Examples

Run this code

if (FALSE) {
set.seed(1)
epsilon<-rnorm(100)
set.seed(2)
x<-matrix(rnorm(1000),100,10)
y<-x[,1]+x[,10]+epsilon
qrssvs<-SSVSquantreg(y~x)
topmodels(qrssvs$gamma)
}

Run the code above in your browser using DataLab