Learn R Programming

SIS (version 0.4)

getfinalSCADcoef: SCAD regularized loglikelihood for generalized linear models

Description

This function gets the final regression coefficients for the SCAD regularized loglikelihood for generalized linear models after applying (I)SIS.

Usage

getfinalSCADcoef(x, y, pickind, folds=NULL, eps0=1e-5, family=binomial(),
tune.method="AIC", inittype='NoPen', detailed=FALSE)

INDEPgetfinalSCADcoef(x, y, pickind,  folds=NULL, xtune, ytune, 
family=binomial(), inittype='NoPen', eps0=1e-5, detailed=FALSE)

Arguments

x
an (n * p) matrix of features.
y
an (n) vector of response.
pickind
predictor indice selected by (I)SIS.
folds
fold information for cross validation.
family
a description of the error distribution and link function to be used in the model.
tune.method
method for tuning regularization parameter.
inittype
inittype specifies the type of initial solution for the one-step SCAD. It can be either NoPen or L1.
xtune, ytune
independent tuning dataset.
eps0
an effective zero.
detailed
indicates whether detailed information will be provided. Default is FALSE.

Value

  • An initial solution vector wt.initsoln and final solution (p+1) vector SCADcoef.

References

Jianqing Fan and Runze Li (2001) Variable selection via nonconcave penalized likelihood and its oracle properties. Journal of American Statistical Association, 96, 1348-1360. Hui Zou and Runze Li (2008) One-step Sparse Estimates in Nonconcave Penalized Likelihood Models (with discussion). The Annals of Statistics, 36, 1509-1533

See Also

scadglm, fullscadglm

Examples

Run this code
set.seed(0)
b <- c(4,4,4,-6*sqrt(2))
n=150
p=200
truerho=0.5
corrmat=diag(rep(1-truerho, p))+matrix(truerho, p, p)
corrmat[,4]=sqrt(truerho)
corrmat[4, ]=sqrt(truerho)
corrmat[4,4]=1
cholmat=chol(corrmat)
x=matrix(rnorm(n*p, mean=0, sd=1), n, p)
x=x%*%cholmat
feta=x[, 1:4]%*%b
fprob=exp(feta)/(1+exp(feta))
y=rbinom(n, 1, fprob)

nsis=floor(n/log(n)/4)
xtune=matrix(rnorm(n*p, mean=0, sd=1), n, p)
xtune=xtune%*%cholmat
feta=xtune[, 1:4]%*%b
fprob=exp(feta)/(1+exp(feta))
ytune=rbinom(n, 1, fprob)

ISIScoef = INDEPgetfinalSCADcoef(x = x, y = y, 
                pickind = 1:4, xtune = xtune, ytune = ytune, 
                family = binomial())

Run the code above in your browser using DataLab