Overlapping Group Lasso (OGLasso)
oglasso(x, y, delta = NULL, group, fused = NULL, family = c("gaussian",
"binomial", "coxph"), nlambda = 100L, lambda = NULL,
lambda.min.ratio = NULL, lambda.fused = 0, alpha = NULL,
group.weights = NULL, adaptive.lasso = FALSE, adaptive.fused = FALSE,
penalty.factor = NULL, penalty.factor.fused = NULL, gamma = 1,
standardize = TRUE, intercept = TRUE, compute.se = FALSE, rho = NULL,
dynamic.rho = TRUE, maxit = 500L, abs.tol = 1e-05, rel.tol = 1e-05,
irls.tol = 1e-05, irls.maxit = 100L)
input matrix of dimension nobs by nvars. Each row is an observation, each column corresponds to a covariate
numeric response vector of length nobs
vector of length equal to the number of observations with values in 1 and 0, where a 1 indicates the observed time is a death and a 0 indicates the observed time is a censoring event
A list of length equal to the number of groups containing vectors of integers
indicating the variable IDs for each group. For example, group = list(c(1,2), c(2,3), c(3,4,5))
specifies
that Group 1 contains variables 1 and 2, Group 2 contains variables 2 and 3, and Group 3 contains
variables 3, 4, and 5. Can also be a matrix of 0s and 1s with the number of columns equal to the
number of groups and the number of rows equal to the number of variables. A value of 1 in row i and
column j indicates that variable i is in group j and 0 indicates that variable i is not in group j.
matrix specifying generalized lasso penalty formulation. Each column corresponds to each variable and each row corresponds to a new penalty term, ie if row 1 has the first entry of 1 and the second entry of -1, then the penalty term lambda.fused * |beta_1 - beta_2| will be added. Not available now
"gaussian" for least squares problems, "binomial" for binary response
The number of lambda values. Default is 100.
A user-specified sequence of lambda values. Left unspecified, the a sequence of lambda values is automatically computed, ranging uniformly on the log scale over the relevant range of lambda values.
Smallest value for lambda, as a fraction of lambda.max, the (data derived) entry
value (i.e. the smallest value for which all parameter estimates are zero). The default
depends on the sample size nobs relative to the number of variables nvars. If
nobs > nvars
, the default is 0.0001, close to zero. If nobs < nvars
, the default
is 0.01. A very small value of lambda.min.ratio
will lead to a saturated fit in
the nobs < nvars
case.
tuning parameter for fused (generalized) lasso penalty
currently not used. Will be used later for fused lasso
A vector of values representing multiplicative factors by which each group's penalty is to be multiplied. Often, this is a function (such as the square root) of the number of predictors in each group. The default is to use the square root of group size for the group selection methods.
Flag indicating whether or not to use adaptive lasso weights. If set to TRUE
and
group.weights
is unspecified, then this will override group.weights
. If a vector is supplied to group.weights,
then the adaptive.lasso
weights will be multiplied by the group.weights
vector
Flag indicating whether or not to use adaptive fused lasso weights.
vector of weights to be multiplied to the tuning parameter for the group lasso penalty. A vector of length equal to the number of groups
vector of weights to be multiplied to the tuning parameter for the fused lasso penalty. A vector of length equal to the number of variables. mostly for internal usage
power to raise the MLE estimated weights by for the adaptive lasso. defaults to 1
Logical flag for x
variable standardization, prior to fitting the models.
The coefficients are always returned on the original scale. Default is standardize = TRUE
. If
variables are in the same units already, you might not wish to standardize.
Should intercept(s) be fitted (default = TRUE
) or set to zero (FALSE
)
Should standard errors be computed? If TRUE
, then models are re-fit with no penalization and the standard
errors are computed from the refit models. These standard errors are only theoretically valid for the
adaptive lasso (when adaptive.lasso
is set to TRUE
)
ADMM parameter. must be a strictly positive value. By default, an appropriate value is automatically chosen
TRUE
/FALSE
indicating whether or not the rho value should be updated throughout the course of the ADMM iterations
integer. Maximum number of ADMM iterations. Default is 500.
absolute convergence tolerance for ADMM iterations for the relative dual and primal residuals.
Default is 10^{-5}
, which is typically adequate.
relative convergence tolerance for ADMM iterations for the relative dual and primal residuals.
Default is 10^{-5}
, which is typically adequate.
convergence tolerance for IRLS iterations. Only used if family != "gaussian"
. Default is 10^{-5}
.
integer. Maximum number of IRLS iterations. Only used if family != "gaussian"
. Default is 100.
An object with S3 class "oglasso"
# NOT RUN {
library(vennLasso)
set.seed(123)
n.obs <- 1e3
n.vars <- 50
true.beta <- c(rep(0,2), 1, -1, rep(0, 8), 0.5, -0.5, 1, rep(0, 35))
x <- matrix(rnorm(n.obs * n.vars), n.obs, n.vars)
y <- rnorm(n.obs, sd = 3) + drop(x %*% true.beta)
groups <- c(list(c(1,2), c(2,3), c(3,4,5), 5:10, 6:12, 7:15), lapply(16:50, function(x) x))
# }
# NOT RUN {
fit <- oglasso(x = x, y = y, group = groups)
# }
Run the code above in your browser using DataCamp Workspace