Lasso: Logistic probability model via penalized maximum likelihood

Description Usage Arguments Value

View source: R/NonMar.R

Description

Fit a logistic probability model based on Lasso penalty

Usage

1
Lasso(xvec,y,xnew,lambda)

Arguments

xvec

An input matrix. Each row is a vectorized predictor.

y

Binary response variable.

xnew

New predictors in the test data. Organized as a matrix with each row being a data point.

lambda

The regularization penalty.

Value

The returned object is a list of components.

B_est - The estimated coefficient vector of linear predictor.

prob - The predicted probabilities for the test data.


TraceAssist documentation built on May 10, 2021, 9:07 a.m.