Repository navigation
Conversation
|
notebook looks good what you could do to get larger p-values is to test a irrelevant or almost irrelevant variable, for example a square of an included continuous variable or just add a random variable (that is maybe slightly correlated with something relevant) Also, are there already unit tests for llf. There are some differences, but they could be small enough to be just numerical differences in the optimization. the p-value looks like it's calculated the same way in R as in statsmodels, e.g. in one example (I guess this means that there is no correction for the possibility that the random effects variance is on the boundary. I think I never read anything specific for the MixedLM case.) In my quick browsing of the notebook, I didn't see an LR test for inclusion of a fixed effect. |
|
There is an example with fixed effects at the end of the notebook. There is a slight catch with R and I will update the examples(and a mini blogpost) as soon as I get to my workstation. |
|
Notebook upated(The bottom most example). |
See #2436
The tests are missing, but a notebook comparing the results of
compare_lr_testand R'sanovais here: http://nbviewer.ipython.org/github/saketkc/statsmodels/blob/kerby_mixedlm_notebooks/examples/notebooks/MixedLM_compare_lr_test.ipynbI am still looking for examples which would help me put together a test for
compare_lr_test. They do not match in the examples that I have used in the notebook, either due to non-convergence or because they are anyway insignificant.