Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

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.

Value

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

Author(s)

Craig Reed

See Also

Examples

## Not run: 
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)

## End(Not run)

MCMCpack

Markov Chain Monte Carlo (MCMC) Package

v1.5-0
GPL-3
Authors
Andrew D. Martin [aut], Kevin M. Quinn [aut], Jong Hee Park [aut,cre], Ghislain Vieilledent [ctb], Michael Malecki[ctb], Matthew Blackwell [ctb], Keith Poole [ctb], Craig Reed [ctb], Ben Goodrich [ctb], Ross Ihaka [cph], The R Development Core Team [cph], The R Foundation [cph], Pierre L'Ecuyer [cph], Makoto Matsumoto [cph], Takuji Nishimura [cph]
Initial release
2021-01-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.