The lmm on value completed.
| formula | value ~ C(treatment) |
| converged | True |
| n_obs | 120 |
| n_groups | 40 |
| loglikelihood | -218.983513 |
| method | lmm |
| value_col | value |
| fixed_col | treatment |
| group_col | subject |
| significant | True |
coefficients
| term | coef | se | z | p | ci_lower | ci_upper |
| Intercept | 9.628778 | 0.463804 | 20.760446 | 0.0 | 8.719739 | 10.537817 |
| C(treatment)[T.treated] | 3.54726 | 0.655918 | 5.408085 | 0.0 | 2.261684 | 4.832835 |
| Group Var | 4.093659 | 1.233466 | 3.318825 | 0.000904 | 1.676109 | 6.511208 |
coef forest
fitted vs observed
residuals vs fitted
Method & Provenance
- Method
- Linear mixed-effects model (random intercept)
- Engine
- Python · statsmodels 0.14.6
- Input dataset
-
gallery — example_lmm.csv
- Started
- 2026-09-21 02:16:46.041991
- Permanent link
- https://cat-g-omxpert.wishartlab.com/results/by-token/a59b0a0c337b4536a6b291f072aadf18
| Parameter | Value |
| test_type | lmm |
| value_col | value |
| group_col | subject |
| fixed_col | treatment |
Command history
# python
import statsmodels.formula.api as smf
# python
model = smf.mixedlm('value ~ fixed', data=df, groups=df['group_col'])
# python
fit = model.fit()