Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beef up the results objects #5

Open
1 of 3 tasks
tyarkoni opened this issue Dec 18, 2019 · 2 comments
Open
1 of 3 tasks

Beef up the results objects #5

tyarkoni opened this issue Dec 18, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@tyarkoni
Copy link
Contributor

tyarkoni commented Dec 18, 2019

The current MetaRegressionResults object is pretty barebones and intended only as a prototype. Minimally, we should:

  • Implement the skeleton summary() and plot() methods.
  • Add a __repr__ method (possibly just aliased to summary()) that includes information about the dataset and estimation (the current to_df() method provides only estimate details).
  • Consider better representations of the internal parameters and associated stats, which are currently all stored in a dict.
@tsalo tsalo pinned this issue Jan 9, 2022
@tsalo tsalo added the enhancement New feature or request label Mar 21, 2022
@tsalo
Copy link
Member

tsalo commented Jun 3, 2022

Here's an example meta-regression summary from metafor:

Random-Effects Model (k = 13; tau^2 estimator: EB)
 
tau^2 (estimated amount of total heterogeneity): 0.2682 (SE = 0.1801)
tau (square root of estimated tau^2 value):      0.5178
I^2 (total heterogeneity / total variability):   87.49%
H^2 (total variability / sampling variability):  7.99
 
Test for Heterogeneity:
Q(df = 12) = 85.8625, p-val < .0001
 
Model Results:
 
estimate      se     zval    pval    ci.lb    ci.ub 
 -0.5429  0.1842  -2.9474  0.0032  -0.9040  -0.1819  ** 
 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

I'm not sure what kinds of plots we might want to implement though.

@tsalo
Copy link
Member

tsalo commented Jun 3, 2022

Here's the result of a first pass at the summary:

Random-Effects Model (k = 12; tau^2 estimator: DerSimonianLaird)

tau^2 (estimated amount of total heterogeneity): 0.0067 (SE = n/a)
tau (square root of estimated tau^2 value):      0.0817
I^2 (total heterogeneity / total variability):   39.47%
H^2 (total variability / sampling variability):  1.65

Test for Heterogeneity:
Q(df = 9) = 14.8695, p-val = 0.0946

Model Results:

     name  estimate     se  z-score  p-value  ci_0.025  ci_0.975
intercept   -0.0037 0.1330  -0.0278   0.9778   -0.2643    0.2569
      age    0.0003 0.0016   0.1781   0.8586   -0.0028    0.0033
 n_houses    0.0140 0.0186   0.7507   0.4528   -0.0225    0.0505

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants