Bauesian Spike-and-Slab Lasso Additive Model
input matrix, of dimension nobs x nvars; each row is an observation vector.
response variable. Quantitative for family="gaussian", or family="poisson" (non-negative counts). For family="binomial", y should be either a factor with two levels, or a two-column matrix of counts or proportions (the second column is treated as the target class; for a factor, the last level in alphabetical order is the target class). For family="cox", y should be a two-column matrix with columns named 'time' and 'status'. The latter is a binary variable, with '1' indicating death, and '0' indicating right censored. The function Surv() in package survival produces such a matrix.
Response type (see above).
A vector of length nobs that is included in the linear predictor.
positive convergence tolerance e; the iterations converge when |dev - dev_old|/(|dev| + 0.1) < e.
integer giving the maximal number of EM iterations.
vector of initial values for all coefficients (not for intercept). If not given, it will be internally produced.
alpha=1
: mixture double-exponential prior; alpha=0
: mixture normal prior.
a vector of two positive scale values (ss[1] < ss[2]) for the spike-and-slab mixture prior, leading to different shrinkage on different predictors and allowing for incorporation of group information.
group-specific inclusion probabilities follow beta(1,b). The tuning parameter b
can be a vector of group-specific values.
a numeric vector, or an integer, or a list defining the groups of predictors. Only used for mde or mt priors. If group = NULL, all the predictors form a single group. If group = K, the predictors are evenly divided into groups each with K predictors. If group is a numberic vector, it defines groups as follows: Group 1: (group[1]+1):group[2], Group 2: (group[2]+1):group[3], Group 3: (group[3]+1):group[4], ..... If group is a list of variable names, group[[k]] includes variables in the k-th group.
Optional weights for the dispersion parameter.
Optional specification for hierarchical interaction terms.
a numeric vector, or an integer, or a list defining the groups of predictors.
If group = NULL
, all the predictors form a single group.
If group = K
, the predictors are evenly divided into groups each with K
predictors.
If group
is a numberic vector, it defines groups as follows: Group 1: (group[1]+1):group[2]
, Group 2: (group[2]+1):group[3]
, Group 3: (group[3]+1):group[4]
, .....
If group
is a list of variable names, group[[k]]
includes variables in the k-th group.
The mixture prior is only used for grouped predictors. For ungrouped predictors, the prior is double-exponential or normal with scale ss[2]
and mean 0.
logical. If TRUE
, show the error messages of not convergence and identifiability.
logical. If TRUE
, print out number of iterations and computational time.
This function returns all outputs from the function glmnet
, and some other values used in Bayesian hierarchical models.