fit_attrib {attrib} | R Documentation |
Data fit using glmer from lme4 with family poisson to fit the dataset with the given formula.
fit_attrib(data, response, fixef, ranef, offset = NULL)
data |
The observed data to be fitted. |
response |
The response |
fixef |
The fixed effects |
ranef |
The random effects |
offset |
The offsets. |
The model fit of the data with additional attributes offset, response and fit_fix. Offset and response are the same as in the input and fit_fix is the linear model of the fix effects.
For more details see the help vignette:
vignette("intro", package="attrib")
response <- "deaths"
fixef <- "pr100_ili_lag_1 + sin(2 * pi * (week - 1) / 52) + cos(2 * pi * (week - 1) / 52)"
ranef <- " (pr100_ili_lag_1| season)"
offset <- "log(pop)"
data <- attrib::data_fake_nation
fit_attrib(data = data, response = response, fixef = fixef, ranef = ranef, offset = offset)