All these functions are methods
for class
"varbvs"
objects.
# S3 method for varbvs
nobs(object, ...)
# S3 method for varbvs
case.names(object, ...)
# S3 method for varbvs
variable.names(object, full = FALSE,
include.threshold = 0.01, ...)
# S3 method for varbvs
labels(object, ...)
# S3 method for varbvs
coef(object, ...)
# S3 method for varbvsmix
coef(object, ...)
# S3 method for varbvs
confint(object, parm, level = 0.95, ...)
# S3 method for varbvs
fitted(object, ...)
# S3 method for varbvs
resid(object, type = c("deviance","response"), ...)
# S3 method for varbvs
residuals(object, type = c("deviance","response"), ...)
# S3 method for varbvs
deviance(object, ...)
An object inheriting from class varbvs
, usually
the result of calling function varbvs
.
logical; if TRUE
, names of all variables (columns
of X
) are returned, including variables that have zero
probability of being included in the regression model.
When full = FALSE
, names of all
variables (columns of X
) with "averaged" posterior inclusion
probability greater than include.threshold
are returned.
Confidence intervals are computed for these selected
variables. These may either be specified as numbers (column indices
of varbvs
input matrix X
) or names (column names of
X
). If not specified, confidence intervals will be computed
for the top 5 variables by posterior inclusion probability.
Confidence intervals are not provided for covariates (columns of
Z
); see below for details.
Size of confidence level.
Type of residuals to be returned. This argument is only
relevant for logistic regression models (family =
"binomial"
). See varbvs
for more details about the
two available types of residuals for logistic regression.
Further arguments passed to or from other methods.
The generic accessor functions nobs
, case.names
,
variable.names
and labels
can be used to extract various
useful properties of the fitted varbvs
model. Method
labels
, in particular, returns the names of the candidate
variables (columns of X
) which may be used, for example, to
plot posterior inclusion probabilities or effect estimates.
coef
returns a matrix containing the posterior estimates of the
regression coefficients at each hyperparameter setting, as well as an
additional column containing "averaged" coefficient estimates.
confint
returns confidence intervals (also, equivalently in
this case, "credible intervals") for all selected variables
parm
. These are conditional confidence intervals; that
is, conditioned on each variable being included in the regression
model.
The confint
return value is different from the usual confidence
interval (e.g., for an lm
result) because a
confidence interval is provided for each hyperparameter setting, as
well as an additional "averaged" confidence interval. The confidence
intervals are returned a list, with one list element per selected
variable, and each list element is a matrix with columns giving lower
and upper confidence limits for each hyperparameter setting, as well
as the averaged limits.
Note that confidence intervals cannot currently be requested for
covariates (columns of Z
).
fitted
returns a matrix containing the predicted (or "fitted")
values of the outcome at each hyperparameter setting. For the logistic
regression model (family = "binomial"
), each matrix entry gives
the probability that the binary outcome is equal to 1.
Likewise, resid
and residuals
each return a matrix
containing the model residuals at each hyperparameter setting.
deviance
returns the deviance for the fitted model at each
hyperparameter setting.
varbvs
, nobs
,
case.names
,
variable.names
, labels
,
coef
, coef
,
fitted
, residuals
,
deviance