Summary statistics related to variable selection
Summary statistics related to variable selection
## S3 method for class 'vsel' summary( object, nterms_max = NULL, stats = "elpd", type = c("mean", "se"), deltas = FALSE, alpha = 0.32, baseline = NULL, ... )
object |
|
nterms_max |
Maximum submodel size for which the statistics are
calculated. For |
stats |
One or several strings determining which statistics to calculate. Available statistics are:
Default is |
type |
One or more items from 'mean', 'se', 'lower' and 'upper'
indicating which of these to compute (mean, standard error, and lower and
upper credible bounds). The credible bounds are determined so that
|
deltas |
If |
alpha |
A number indicating the desired coverage of the credible
intervals. For example |
baseline |
Either 'ref' or 'best' indicating whether the baseline is the reference model or the best submodel found. Default is 'ref' when the reference model exists, and 'best' otherwise. |
... |
Currently ignored. |
if (requireNamespace('rstanarm', quietly=TRUE)) { ### Usage with stanreg objects n <- 30 d <- 5 x <- matrix(rnorm(n*d), nrow=n) y <- x[,1] + 0.5*rnorm(n) data <- data.frame(x,y) fit <- rstanarm::stan_glm(y ~ X1 + X2 + X3 + X4 + X5, gaussian(), data=data, chains=2, iter=500) vs <- cv_varsel(fit) plot(vs) # print out some stats summary(vs, stats=c('mse'), type = c('mean','se')) }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.