cv.glmmsel | R Documentation |
Fits the regularisation path for a sparse generalised linear mixed model and then cross-validates this path.
cv.glmmsel(
x,
y,
cluster,
family = c("gaussian", "binomial"),
lambda = NULL,
nfold = 10,
folds = NULL,
cv.loss = NULL,
interpolate = TRUE,
...
)
x |
a predictor matrix |
y |
a response vector |
cluster |
a vector of length |
family |
the likelihood family to use; 'gaussian' for a continuous response or 'binomial' for a binary response |
lambda |
the regularisation parameter for the overlapping penalty on the fixed and random slopes |
nfold |
the number of cross-validation folds |
folds |
an optional vector of length |
cv.loss |
an optional cross-validation loss-function to use; should accept a vector of predicted values and a vector of actual values |
interpolate |
a logical indicating whether to interpolate the |
... |
any other arguments for |
An object of class cv.glmmsel
; a list with the following components:
cv.mean |
a vector of cross-validation means |
cv.sd |
a vector of cross-validation standard errors |
lambda |
a vector of cross-validated regularisation parameters |
lambda.min |
the value of |
fit |
the fit from running |
Ryan Thompson <ryan.thompson-1@uts.edu.au>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.