Calculates the sequence of penalty parameters used in the model selection procedure.
This function calls functions from package ncvreg
.
LambdaSeq(
X,
y,
family,
offset = NULL,
alpha = 1,
lambda.min = NULL,
nlambda = 10,
penalty.factor = NULL
)
numeric sequence of penalty parameters of length nlambda
ranging from the
minimum penalty parameter (first element) equal to fraction lambda.min
multiplied by the
maximum penalty parameter to the maximum penalty parameter (last element)
matrix of standardized fixed effects (see std
function in ncvreg
documenation). X should not include intercept.
numeric vector of response values. If "survival" family, y
are the event indicator
values (0 if censored, 1 if event)
a description of the error distribution and link function to be used in the model.
Currently, the glmmPen
algorithm allows the Binomial ("binomial" or binomial()),
Gaussian ("gaussian" or gaussian()), and Poisson ("poisson" or poisson()) families
with canonical links only. See phmmPen
for variable selection within
proportional hazards mixed models for survival data.
numeric vector that can be used to specify an a priori known component
to be included in the linear predictor during fitting.
This should be NULL
or a numeric vector of length equal to the number of observations
Tuning parameter for the Mnet estimator which controls the relative contributions
from the MCP/SCAD/LASSO penalty and the ridge, or L2, penalty. alpha=1
is equivalent to
the MCP/SCAD/LASSO penalty, while alpha=0
is equivalent to ridge regression. However,
alpha=0
is not supported; alpha
may be arbitrarily small, but not exactly zero
numeric fraction between 0 and 1. The sequence of the lambda penalty parameters
ranges from the maximum lambda where all fixed and random effects are penalized to 0 and
a minimum lambda value, which equals a small fraction of the maximum lambda. The parameter
lambda.min
specifies this fraction. Default value is set to NULL
, which
automatically selects lambda.min
to equal 0.01 when the number of observations is
greater than the number of fixed effects predictors and 0.05 otherwise.
Only used
if either lambda0_seq
or lambda1_seq
remain unspecified by the user
(one or both of these sequence arguments set to NULL
) and, consequently,
one or more default sequences need
to be calculated.
positive integer specifying number of penalty parameters (lambda) with which to fit a model.
an optional numeric vector equal to the fixef_noPen
argument
in glmmPen