lasso_classifier
applies lasso classification to a data set.
lasso_classifier(
L2.fix,
L1.re,
data.train,
lambda,
model.family,
y,
verbose = c(TRUE, FALSE)
)
A multilevel lasso model. An glmmLasso
object.
Fixed effects. A two-sided linear formula describing the fixed effects part of the model, with the outcome on the LHS and the fixed effects separated by + operators on the RHS.
Random effects. A named list object, with the random effects providing the names of the list elements and ~ 1 being the list elements.
Training data. A data.frame containing the training data used to train the model.
Tuning parameter. Lambda is the penalty parameter that controls the shrinkage of fixed effects.
Model family. A variable indicating the model family to be used by glmmLasso. Defaults to binomial(link = "probit").
Outcome variable. A character vector containing the column names of
the outcome variable. A character scalar containing the column name of
the outcome variable in survey
.
Verbose output. A logical vector indicating whether or not verbose output should be printed.