unilps: univariate model fitting with lasso penalty

Description Usage Arguments Details Value See Also Examples

Description

fit univariate log-linear model using accelerated block-coordinate relaxation algorithm.

Usage

1
2
3
4
5
unilps(formula, data = list(),
       family = c("gaussian", "binomial"),
       lambda = NULL, nlambda = 100,
       lambda.min.ratio = ifelse(nobs<nvars, .01, .0001),
       output = 0, tune = c("AIC", "BIC", "GACV", "BGACV"))

Arguments

formula

a symbolic description of the model to be fit.

data

an optional data frame containing the variables in the model. By default the variables are taken from the environment from which unifit is called.

family

a GLM family, currently suport gaussian and binomial.

lambda

a user specified tuning sequece. Typical usage is to have the program compute its own lambda.

nlambda

the number of lambda values, default is 100.

lambda.min.ratio

Smallest value for lambda, as a fraction of lambda.max. The default depends on the sample size nobs relative to the number of variables.

output

with values 0 or 1, indicating whether the fitting process is muted or not.

tune

tuning approach, available methods including AIC, BIC, GACV, BGACV.

Details

The unilps utilize the class structure of the underlying C++ code and fitted the model with accelerated block-coordinate relaxation algorithm.

Value

An object of classes mvbfit and lps, for which some methods are available.

See Also

unilps, mvblps

Examples

1
2
3
4
5
6
7
n <- 100
p <- 4
x <- matrix(rnorm(n * p, 0, 4), n, p)
eta <- x 
pr <- exp(eta) / (1+ exp(eta))
res <- rbinom(n, 1, pr)
fit <- unilps(res ~ x - 1, family = 'binomial')

MVB documentation built on May 2, 2019, 3:06 a.m.