AICc_BIC_glmnetB {SelectBoost}R Documentation

AICc and BIC for glmnet logistic models

Description

Compute AICc and BIC for glmnet logistic models.

Usage

rerr(v1, v2)

ridge_logistic(X, Y, lambda, beta0, beta, maxiter = 1000, tol = 1e-10)

BIC_glmnetB(Z, Y, glmnet.model, alpha, modelSet, reducer = "median")

AICc_glmnetB(Z, Y, glmnet.model, alpha, modelSet, reducer = "median")

Arguments

v1

A numeric vector.

v2

A numeric vector.

X

A numeric matrix

Y

A numeric 0/1 vector.

lambda

A numeric value.

beta0

A numeric value Initial intercept value.

beta

A numeric vector. Initial coefficient values.

maxiter

A numeric value. Maximum number of iterations.

tol

A numeric value. Tolerance value.

Z

A numeric matrix

glmnet.model

A fitted glmnet model.

alpha

A numeric value.

modelSet

Modelset to consider.

reducer

A character value. Reducer function. Either 'median' or 'mean'.

Details

Calculate AICc and BIC for glmnet logistic models from the glmnetB function of the package rLogistic https://github.com/echi/rLogistic and adapted to deal with non finite exponential values in AICc and BIC computations

Value

A list relevant to model selection.

Author(s)

Frederic Bertrand, frederic.bertrand@utt.fr

References

Robust Parametric Classification and Variable Selection by a Minimum Distance Criterion, Chi and Scott, Journal of Computational and Graphical Statistics, 23(1), 2014, p111–128, doi:10.1080/10618600.2012.737296.

See Also

var_select

Examples

set.seed(314)
xran=matrix(rnorm(150),30,5)
ybin=sample(0:1,30,replace=TRUE)
glmnet.fit <- glmnet.fit <- glmnet::glmnet(xran,ybin,family="binomial",standardize=FALSE)
set.seed(314)
rerr(1:10,10:1)

set.seed(314)
ridge_logistic(xran,ybin,lambda=.5,beta0=rnorm(5),beta=rnorm(5,1))

set.seed(314)
if(is.factor(ybin)){ynum=unclass(ybin)-1} else {ynum=ybin}
subSample <- 1:min(ncol(xran),100)
BIC_glmnetB(xran,ynum,glmnet.fit,alpha=1,subSample, reducer='median')

set.seed(314)
if(is.factor(ybin)){ynum=unclass(ybin)-1} else {ynum=ybin}
subSample <- 1:min(ncol(xran),100)
AICc_glmnetB(xran,ynum,glmnet.fit,alpha=1,subSample, reducer='median')


[Package SelectBoost version 2.2.2 Index]