Kshedden mixed rebased of #1398 #1688

Merged
merged 59 commits into from May 24, 2014

Projects

None yet

3 participants

@josef-pkt
Member

rebased and python 3 compat changes of PR #1398 mixed effects models

kshedden and others added some commits Feb 17, 2014
@kshedden @josef-pkt kshedden Initial commit 6b2a82a
@kshedden @josef-pkt kshedden Basic working version 70ffb96
@kshedden @josef-pkt kshedden Added test script a15f7b6
@kshedden @josef-pkt kshedden Work on R tests f7c7084
@kshedden @josef-pkt kshedden Ready for WIP PR 2722d1d
@kshedden @josef-pkt kshedden Renamed generate... to avoid triggering testing 4fe7c10
@kshedden @josef-pkt kshedden Minor changes 286602d
@kshedden @josef-pkt kshedden Major rewrite to provide REML and ML. Still WIP, many pieces missing. 38ccde6
@kshedden @josef-pkt kshedden Implemented analytic Hessian 7d112be
@kshedden @josef-pkt kshedden Added summary method 8c5e6af
@kshedden @josef-pkt kshedden Added summary method d4947b4
@kshedden @josef-pkt kshedden Trying to resolve travis failure 2f5c542
@kshedden @josef-pkt kshedden Fixed error in full likelihood fe3ad22
@kshedden @josef-pkt kshedden Switched initial optimizer from EM to steepest descent 01b474e
@kshedden @josef-pkt kshedden Switch optimizer to fmin_cg f0d244f
@kshedden @josef-pkt kshedden Diagnosing travis failure 6c24f3d
@kshedden @josef-pkt kshedden Switched to Psi = LL' parameterization 9a58241
@kshedden @josef-pkt kshedden Add numeric derivative tests 947ac84
@kshedden @josef-pkt kshedden Changed signature for full likelihood calculation 3d9e069
@kshedden @josef-pkt kshedden Added int conversion for py3 compatability 2526927
@kshedden @josef-pkt kshedden Added notes to the top of the file 0ed1aa8
@kshedden @josef-pkt kshedden Added support for formulas aea4b7e
@kshedden @josef-pkt kshedden Added ranef to return mean of random effects 89a4052
@kshedden @josef-pkt kshedden Add function to return posterior covariance matrix of random effects fee8d9b
@kshedden @josef-pkt kshedden Use SMW and determinant lemma to speed linear algebra calculations d33a1ee
@kshedden @josef-pkt kshedden Added ability to constrain variance parameters to zero (allows models…
… with independent random effects to be estimated)
7ebb5b4
@kshedden @josef-pkt kshedden Further linear algebra improvements 6f68ebd
@kshedden @josef-pkt kshedden Fixed issue with hessian in restricted variance case edb1882
@kshedden @josef-pkt kshedden Use profile likelihood to calculate the full likelihood; remove redun…
…dant full likelihood code
cfc88c0
@kshedden @josef-pkt kshedden Added profile likelihood routine e5503f2
@kshedden @josef-pkt kshedden Improve documentaiton 8387710
@kshedden @josef-pkt kshedden Added release notes for LME 0760253
@kshedden @josef-pkt kshedden Renamed revar to cov_re 6b33009
@kshedden @josef-pkt kshedden Various renamings per Josef's suggestions 1922029
@kshedden @josef-pkt kshedden Further renamings for clarity 3aa55ec
@kshedden @josef-pkt kshedden Added fit_regularized and supporting class for solution path 7383e2c
@kshedden @josef-pkt kshedden Streamline the likelihood calculation a bit f87b30d
@kshedden @josef-pkt kshedden Further streamline the likelihood calculation 0cd1fb4
@kshedden @josef-pkt kshedden Add a starting brack for the golden search 7595de5
@kshedden @josef-pkt kshedden Greatly accelerated fit_regularized using analytic calculations inste…
…ad of brute force
e141b58
@kshedden @josef-pkt kshedden Preparing to remove lme_examples.py 06e8697
@kshedden @josef-pkt kshedden Removing lme_examples.py 78997b6
@kshedden @josef-pkt kshedden Added fit_regularized, removed solution path code for separate PR 2ea0f88
@kshedden @josef-pkt kshedden Added ridge option to fit_regularized de76fab
@kshedden @josef-pkt kshedden Penalty and CovariancePenalty classes to allow more flexibility in sp…
…ecifying penalized models
ca705a1
@kshedden @josef-pkt kshedden alpha must be used in fit_regularized for solution paths to work 8ca6aff
@kshedden @josef-pkt kshedden Better intergration with solution_path ba1869b
@kshedden @josef-pkt kshedden Update value of nparams d41050b
@kshedden @josef-pkt kshedden Added comment c06cbd8
@kshedden @josef-pkt kshedden Fixed several errors, seems to work well now 7ca3aed
@kshedden @josef-pkt kshedden Improved names handing, added a few tests b27d114
@kshedden @josef-pkt kshedden Refactored loglike and score calls, fit now cllas super.fit bf024f6
@kshedden @josef-pkt kshedden Clean up some comments 039b4f5
@kshedden @josef-pkt kshedden Chaged numeric Hessian routine to _ce version be859d1
@kshedden @josef-pkt kshedden Cleanup tests (place R results in bunch, use seed for random data) a3917d1
@kshedden @josef-pkt kshedden Fixed error when using formulas + set_random fa2b7ee
@kshedden @josef-pkt kshedden Rename a few keyword arguments, renamed penalties.py to _penalties.py a6da55b
@kshedden @josef-pkt kshedden Edit release statement for clarity b0b9ab8
@josef-pkt josef-pkt BUG python 3 compat b04bddf
@josef-pkt josef-pkt referenced this pull request May 24, 2014
Closed

WIP linear mixed models #1398

@josef-pkt
Member

I'm getting one suspicious warning running the test suite:

E:\Josef\eclipsegworkspace\statsmodels-git\statsmodels-all-new2_py27\statsmodels\statsmodels\regression\lme.py:551: ComplexWarning: Casting complex values to real discards the imaginary part
  cov_re[ix] = re_params

Ran 53 tests in 104.467s

@coveralls

Coverage Status

Coverage increased (+0.15%) when pulling b04bddf on josef-pkt:kshedden_mixed_rebased into 3adaa1a on statsmodels:master.

@josef-pkt
Member

merging this, rebase looks good from spot checking

needs a follow-up and a new issue
Test coverage has gaps (EM?) https://coveralls.io/files/205591508 78%
also I didn't see any tests for results other than the basic params, cov and scales.

params_table in summary uses normal distribution, do we have df_resid, df_model?
(is there a small sample option for inference?)

from_formula should be overwritten to take a formula for exog_re (only a designmatrix), I guess.

predict? unconditional mean, BLUE for individual ?

@josef-pkt josef-pkt merged commit 6ff0f30 into statsmodels:master May 24, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@josef-pkt josef-pkt deleted the josef-pkt:kshedden_mixed_rebased branch Jul 10, 2014
@josef-pkt josef-pkt added the PR label Aug 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment