palasso: Paired lasso

View source: R/function.R

palassoR Documentation

Paired lasso

Description

The function palasso fits the paired lasso. Use this function if you have paired covariates and want a sparse model.

Usage

palasso(y = y, X = X, max = 10, ...)

Arguments

y

response: vector of length n

X

covariates: list of matrices, each with n rows (samples) and p columns (variables)

max

maximum number of non-zero coefficients: positive numeric, or NULL (no sparsity constraint)

...

further arguments for cv.glmnet or glmnet

Details

Let x denote one entry of the list X. See glmnet for alternative specifications of y and x. Among the further arguments, family must equal "gaussian", "binomial", "poisson", or "cox", and penalty.factor must not be used.

Hidden arguments: Deactivate adaptive lasso by setting adaptive to FALSE, activate standard lasso by setting standard to TRUE, and activate shrinkage by setting shrink to TRUE.

Value

This function returns an object of class palasso. Available methods include predict, coef, weights, fitted, residuals, deviance, logLik, and summary.

References

A Rauschenberger, I Ciocanea-Teodorescu, RX Menezes, MA Jonker, and MA van de Wiel (2020). "Sparse classification with paired covariates." Advances in Data Analysis and Classification. 14:571-588. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s11634-019-00375-6")}, pdf, armin.rauschenberger@uni.lu

Examples

set.seed(1)
n <- 50; p <- 20
y <- rbinom(n=n,size=1,prob=0.5)
X <- lapply(1:2,function(x) matrix(rnorm(n*p),nrow=n,ncol=p))
object <- palasso(y=y,X=X,family="binomial") # adaptive=TRUE,standard=FALSE
names(object)


rauschenberger/palasso documentation built on Feb. 18, 2024, 11:02 p.m.