lasso_classifier: Lasso classifier

View source: R/lasso_classifier.R

lasso_classifierR Documentation

Lasso classifier

Description

lasso_classifier applies lasso classification to a data set.

Usage

lasso_classifier(
  L2.fix,
  L1.re,
  data.train,
  lambda,
  model.family,
  y,
  verbose = c(TRUE, FALSE)
)

Arguments

L2.fix

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.

L1.re

Random effects. A named list object, with the random effects providing the names of the list elements and ~ 1 being the list elements.

data.train

Training data. A data.frame containing the training data used to train the model.

lambda

Tuning parameter. Lambda is the penalty parameter that controls the shrinkage of fixed effects.

model.family

Model family. A variable indicating the model family to be used by glmmLasso. Defaults to binomial(link = "probit").

y

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

Verbose output. A logical vector indicating whether or not verbose output should be printed.

Value

A multilevel lasso model. An glmmLasso object.


autoMrP documentation built on May 29, 2024, 6:40 a.m.