Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

maxlambda

Extract maximum lambda


Description

maxlambda extracts the maximum tuning parameter that ensures the estimated regression coefficients are not all zero for the object of class MGLMsparsereg.

Usage

## S4 method for signature 'MGLMsparsereg'
maxlambda(object)

Arguments

object

an object of class MGLMsparsereg from which maximum lambda value can be extracted.

Value

Returns a maximum lambda value of object.

Examples

library("MGLM")
dist <- "DM"
n <- 100
p <- 10
d <- 5
set.seed(118)
m <- rbinom(n, 200, 0.8)
X <- matrix(rnorm(n * p), n, p)
alpha <- matrix(0, p, d)
alpha[c(1, 3, 5), ] <- 1
Alpha <- exp(X %*% alpha)
Y <- rdirmn(size = m, alpha = Alpha)
pen <- "group"
ngridpt <- 30
spmodelfit <- MGLMsparsereg(formula = Y ~ 0 + X, dist = dist, 
                            lambda = Inf, penalty = pen)
maxlambda <- maxlambda(spmodelfit)

MGLM

Multivariate Response Generalized Linear Models

v0.2.0
GPL (>= 2)
Authors
Yiwen Zhang <zhangyiwen1015@gmail.com> and Hua Zhou <huazhou@ucla.edu>
Initial release
2018-10-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.