.fit.glmm | R Documentation |
tidyfit
Fits a linear or logistic mixed-effects model (GLMM) on a 'tidyFit' R6
class. The function can be used with regress
and classify
.
## S3 method for class 'glmm'
.fit(self, data = NULL)
self |
a 'tidyFit' R6 class. |
data |
a data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). |
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
A fitted 'tidyFit' class model.
Johann Pfitzinger
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.
.fit.glm
and m
methods
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.