-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Store fits and residuals in Lm2 models. Also compute model r2 metrics * Remove manual rhome set during dev * lrt for lmer objects Implement loglik ratio test analogous to the one implemented in lme4 * Fix pandas deprecated function * Add BIC and deviance to lrt Make output closer to lme4 * Match behaviour in R Make sure npar are correct and other values are in the same order * Format code with black * Get correct AIC AICTab in summary of an lmer fitted by REML gives the deviance, not the AIC. * Add tests for lrt For the moment, we use a static dump of the R output, as rpy2 seems to clash with pytest * Add confint to test variances * Add tests for confint * Guard against using lrt for non Lmer models * Temp fix for rpy2 3.5.1, but not until they fix #873 recursion error * Bump rpy2 and pandas requirements * Update dep versions code changes to address rpy2 deprecation warnings * try fixing GA ci * try fixing GA ci * rename meta.yaml and bump numpy version * try fixing GA ci * try fixing GA ci * remove deprecated future imports * refactor code to pull out R<->Py conversion into a separate module and remove global conversion activators * fix bug in saving confints * fixes #88, #113 * add sklearn dependency * initial implementation code * use pytest fixtures for data loading * complete working (basic) implementation of Logistic Regression * logistic Lm estimate test against glm() in R * add rpy2 back to requirements * reorg workflow files to run tests only on each push/pr * whoops remove dev branch ref * Update Tests.yml * try fixing GA ci * try fixing GA ci * try fixing GA ci * install rpy2 from conda-forge instead of pip to see if rpy2 linking works on macos * install rpy2 from conda-forge instead of pip to see if rpy2 linking works on macos * try old optimizer for inverse_gaussian model * comment out rfx only models that crash only on GA * GA try continuing on expected failure * fix up conda build * fix ci * Update Tests.yml * Update Build.yml * fix ci * update meta.yaml for working local build * Update Tests.yml * store fits in logistic Lm and add support for .predict * allow .predict to return probs or original scale vals. Fix bug in converting logits to probs in Lmer. Fixes #78" * add sphinx to dev reqs and update changelog * update gitignore * refactor Lm a bit Co-authored-by: Andrea Manica <am315@cam.ac.uk>
- Loading branch information
Showing
22 changed files
with
1,445 additions
and
677 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,9 @@ dev/ | |
.vscode/settings.json | ||
*.key | ||
pytest.ini | ||
env/* | ||
conda/build/* | ||
.pytest_cache | ||
.tox | ||
.venv | ||
environment.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,10 @@ | ||
from __future__ import absolute_import | ||
|
||
__all__ = ["models", "utils", "simulate", "stats", "io", "__version__"] | ||
|
||
from .models import Lmer, Lm, Lm2 | ||
from .simulate import easy_multivariate_normal, simulate_lm, simulate_lmm | ||
|
||
from .utils import ( | ||
get_resource_path, | ||
isPSD, | ||
nearestPSD, | ||
upper, | ||
R2con, | ||
con2R, | ||
result_to_table, | ||
) | ||
from .io import save_model, load_model | ||
from .stats import ( | ||
discrete_inverse_logit, | ||
cohens_d, | ||
perm_test, | ||
tost_equivalence, | ||
boot_func, | ||
welch_dof, | ||
vif, | ||
) | ||
from .simulate import * | ||
|
||
from .utils import * | ||
from .io import * | ||
from .stats import * | ||
from .bridge import * | ||
from .version import __version__ |
Oops, something went wrong.