Fits a linear or logistic mixed-effects model (GLMM) on a 'tidyFit' R6
class. The function can be used with regress
and classify
.
Details
Hyperparameters:
None. Cross validation not applicable.
Important method arguments (passed to m
)
The function provides a wrapper for lme4::glmer
. See ?glmer
for more details.
Implementation
No implementation notes
References
Douglas Bates, Martin Maechler, Ben Bolker, Steve Walker (2015). Fitting Linear Mixed-Effects Models Using lme4. Journal of Statistical Software, 67(1), 1-48. doi:10.18637/jss.v067.i01.
Examples
# Load data
data <- tidyfit::Factor_Industry_Returns
data$Return <- ifelse(data$Return > 0, 1, 0)
# Estimate model with random effects
fit <- classify(data, Return ~ CMA + (CMA | Industry), logit = m("glmm"),
.mask = "Date")
fit
#> # A tibble: 1 × 7
#> model estimator_fct `size (MB)` grid_id model_object settings messages
#> <chr> <chr> <dbl> <chr> <list> <list> <chr>
#> 1 logit lme4::glmer 1.31 #0010000 <tidyFit> <tibble> "boundar…