Repository navigation
ENH: add meta-analysis (basic methods) - #6632
Conversation
|
Hello @josef-pkt! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-04-30 00:59:51 UTC |
|
There is overlap with oneway anova PR #6526 where Welch anova uses similar weighted average. One difference in signature based on summary statistic is that In meta we don't use nobs directly |
|
This pull request introduces 3 alerts when merging b42df4c into 73a2ed7 - view on LGTM.com new alerts:
|
|
This pull request introduces 3 alerts when merging 0abd0bb into 73a2ed7 - view on LGTM.com new alerts:
|
|
case is DL + HK metafor docs reference for this, AFAIR, I didn't look at this article, When I use test="knha" with method="FE", then I get a warning that knha is not appropriate with FE. But it is just WLS in that case. wls/hksj scale depends on weights, so need FE and RE versions. |
|
q_stat versus pearson_chi2, or are these statistics on the final model. general issue: My initial implementation didn't use metafor as reference, and returns both FE and RE results to match the tables in books and articles. I thought of including both wls/hksj scale and scale=1 results by default (instead of the scale argument). Advantage of always adding HKSJ/WLS results is that users see it, even if they wouldn't think about requesting it. Related: Hartung Knapp have an article that truncates The main problem with scale, and RE estimate is if the number of studies/samples is small, since that is base only on between information. On the other side, have reliable estimates of variance of means in individual samples/studies requires large nobs in each sample. |
|
|
||
|
|
||
| def effectsize_smd(mean2, sd2, nobs2, mean1, sd1, nobs1, row_names=None, | ||
| alpha=0.05): |
There was a problem hiding this comment.
alpha is currently unused, we don't return confint for now
| sd_smdbc = np.sqrt(var_smdbc) | ||
|
|
||
| ci_low = smd_bc - 1.96 * sd_smdbc | ||
| ci_upp = smd_bc + 1.96 * sd_smdbc |
There was a problem hiding this comment.
those don't really belong here
either move to effect size, but then we need more information from effect size computation
or move to results class
we should have separate options for samples conf_ints method, instead of hardcoding normal/z confints
|
another addition: I haven't tried meta-analysis plot functions yet. also, rename Should we allow user defined weights, or tell the user to use GLM/WLS in that case? |
|
This pull request introduces 1 alert when merging 883a391 into 73a2ed7 - view on LGTM.com new alerts:
|
8b9b1b3 to
f56d268
Compare
|
still problem with confint for individual samples. Because we have an |
|
This pull request introduces 1 alert when merging f56d268 into 1ccd5cd - view on LGTM.com new alerts:
|
|
detail: metafor hksj changes distribution for mean and omnibus test (all slope coefficients=0), but not for Q test for homogeneity unit tests for |
|
wrong convention for sample 1 versus sample 2, see #811 need to rename and switch indices in names effectsize_2proportions (not yet pushed) overlaps with contingency table and PR #4829 |
|
I'm giving up here, and plan to merge soon. Needs a follow-up before next release to check API again, and review for code duplication with other PRs, especially for effect sizes |
|
only one lint failure on travis, and azure for previous commit However, maybe no azur testing for the last doc commit ? |
|
AFAICS, no warnings in notebook, except spelling, misspelled measurements |
|
unit test coverage is pretty low, 65% of lines on coveralls: |
9449034 to
1a14405
Compare
|
merging, unit tests green, style not |
add basic methods for univariate meta-analysis
will include the corresponding effect size measures
#1575 request for including meta-analysis methods in statsmodels
#6585 comments on technical details and about current implementation
WIP
looks good so far, i.e. I can replicate basic cases
plan is to give up and merge once I have the basic options and API