hmlasso: Fit a model using a design matrix

Description Usage Arguments Value Examples

View source: R/lasso.R

Description

Fit a model using a design matrix

Usage

1
2
3
4
5
hmlasso(X, y, family = "gaussian", impl = "cpp",
  lambda.min.ratio = 0.01, nlambda = 100, lambda = NULL,
  min_eig_th = 1e-06, use = "pairwise.complete.obs",
  positify = "diag", weight_power = 1, eig_tol = 1e-08,
  eig_maxitr = 1e+08, mu = 1, verbose = FALSE, ...)

Arguments

X

matrix of explanatory variables

y

vector of objective variable

family

family of regression: "gaussian" (default) or "binomial"

impl

implementation language of optimization (only "cpp" is supported)

lambda.min.ratio

ratio of max lambda and min lambda (ignored if lambda is specified)

nlambda

the number of lambda (ignored if lambda is specified)

lambda

lambda sequence

min_eig_th

threshold of the minimum eigenvalue in the PSD matrix problem.

use

method to calculate correlation matrix from missing data (default "pairwise.complete.obs")

positify

method for solving PSD matrix

weight_power

weighting power (default 0 meaning no-weighting)

eig_tol

tol parameter in eigs_sym function

eig_maxitr

maxitr parameter in eigs_sym

mu

augmented Lagrangian parameter

verbose

whether output verbose warnings and messages (default FALSE)

...

parameters for optimization

Value

lasso model

beta

coefficients

beta_standard

standardized coefficients

a0

intercepts

lambda

regularization parameters

family

family

Examples

1
2
3
4
5
6
X_incompl <- as.matrix(iris[, 1:3])
X_incompl[1:5,1] <- NA
X_incompl[6:10,2] <- NA
y <- iris[, 4]
fit <- hmlasso(X_incompl, y, nlambda=50, lambda.min.ratio=1e-2)
plot(fit)

hmlasso documentation built on Aug. 3, 2019, 9:03 a.m.