Include an example of a random slope model as a way to demonstrate how to use this aspect of statsmodels
#72
Labels
enhancement
New feature or request
statsmodels
#72
aas-extended-examples/example-6/example-6-answers.md
Line 274 in f57c16d
There is an example on the following page of the the
statsmodels
documentation:https://www.statsmodels.org/dev/examples/notebooks/generated/mixed_lm_example.html
Basically, you use the
re_formula
in addition to the existingformula
(which specifies fixed effects) andgroup
to specify a random slope (and intercept) model.Here is an example of fitting a random intercept model
and here it is with the random slope for each pig through time as well as the random intercept:
The text was updated successfully, but these errors were encountered: