fit.lognet: Tailormade weighted fitting of logistic glmnet

Description Usage Arguments Value Author(s) See Also Examples

View source: R/fit.lognet.R

Description

Do dummy coding on dataset and fit logistic (crossvalidated) glmnet

Usage

1
2
3
4
5
  fit.lognet(ds, out, lambda,
    weights = (rep(1, dim(ds)[1])), verbosity = 0,
    standardize = FALSE, type.measure = NULL,
    imputeDs2FitDsProperties = normalImputationConversion(),
    ...)

Arguments

ds

dataset (numdfr or data.frame)

out

outcome vector

lambda

(single) lambda to use

weights

weight vector per observation (does not have to sum to 1, and defaults to equal weights)

verbosity

The higher this value, the more levels of progress and debug information is displayed (note: in R for Windows, turn off buffered output)

standardize

if TRUE (NOT the default), all variables are standardized before fitting.

type.measure

one of the crossvalidating measures provided by glmnet or NULL (default) to not do crossvalidation

imputeDs2FitDsProperties

see imputeDs2FitDs and EMLasso

...

passed on to glmnet or cv.glmnet.

Value

depending on type.measure being NULL, a glmnet or cv.glmnet object.

Author(s)

Nick Sabbe nick.sabbe@ugent.be

See Also

glmnet

Examples

1
2
3
y<-rbinom(nrow(iris), 1, 0.5)
lnet<-fit.lognet(iris, y, lambda=0.05, weights=runif(nrow(iris)), verbosity=1)
cv.lnet<-fit.lognet(iris, y, lambda=0.05, weights=runif(nrow(iris)), verbosity=1, type.measure="auc")

EMLasso documentation built on May 2, 2019, 5:49 p.m.