View source: R/computeLambda.R
buildLambdas | R Documentation |
generate lambda vector based on dataset given
buildLambdas(fix, rnd, data, nlambdas = 100,
lambda.min.ratio = ifelse(nobs < nvars, 0.01, 1e-04))
fix |
A two-sided linear formula object describing the fixed-effects part of the model, with the response on the left of a ~ operator and the terms, separated by + operators, on the right. For categorical covariables use as.factor(.) in the formula. Note, that the corresponding dummies are treated as a group and are updated blockwise |
rnd |
A two-sided linear formula object describing the random-effects part of the model, with the grouping factor on the left of a ~ operator and the random terms, separated by + operators, on the right; alternatively, the random effects design matrix can be given directly (with suitable column names). If set to NULL, no random effects are included. |
data |
The data frame containing the variables named in formula. |
nlambdas |
the number of lambdas values, default value is 100 if lambdas is not user-supplied |
lambda.min.ratio |
Smallest value for lambda, as a fraction of lambda.max, the (data derived) entry value (i.e. the smallest value for which all coefficients 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. |
returns a vector of lambda
Pirapong Jitngamplang, Jared Lander
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.