wtlassoglm {SIS}R Documentation

Weighted L1 regularized loglikelihood for generalized linear models

Description

This functions solves weighted L1 regularized loglikelihood for generalized linear models.

Usage

wtlassoglm(x, y, lassoweight=NULL, initsoln=NULL,   family = binomial(), 
weight = NULL, offset = NULL, lambda2=0, function.precision=1e-8)

Arguments

x an (n * p) matrix of features.
y an (n) vector of response.
lassoweight a (p) vector of weights specifying the weighted L1 penalty.
initsoln a (p+1) vector of initial solution.
family a description of the error distribution and link function to be used in the model.
weight an optional (n) vector of weights to be used in the fitting process.
offset this can be used to specify an a priori known component to be included in the linear predictor during fitting.
lambda2 regularization parameter for the L2 norm of the coefficients. Default is 0.
function.precision function.precision parameter used in the internal solver. Default is 1e-8.

Details

This function solves weighted L1 regularized loglikelihood for generalized linear models. It is based on the source code of R package glmpath.

Value

An object is returned with

lambda2 λ_2 used.
xnames column names of x.
family a description of the error distribution and link function to be used in the model.
weight an optional (n) vector of weights to be used in the fitting process.
offset this can be used to specify an a priori known component to be included in the linear predictor during fitting.
lassoweight a (p) vector of weights specifying the weighted L1 penalty.
initsoln a (p+1) vector of initial solution.
w a (p+1) vector of weight L1 solution.

Author(s)

Jianqing Fan, Yang Feng, Richard Samworth, and Yichao Wu

See Also

scadglm, fullscadglm

Examples

set.seed(0)
b <- c(2,2,2,-3*sqrt(2))
n=400
p=30
truerho=0.5
x=matrix(rnorm(n*p, mean=0, sd=1), n, p)
feta=x[, 1:4]%*%b
fprob=exp(feta)/(1+exp(feta))
y=rbinom(n, 1, fprob)
lassoweight<-rep(0.6,30)
wtlassoglm(x,y,lassoweight)$w
coef(glm(y~x,family=binomial()))

[Package SIS version 0.2 Index]