README.md

Travis build
status

metabroom

The goal of metabroom is to broom meta-analysis models produced by metafor. That is, when I finish it.

See the testing file to see where I’m at.

Example

Get example dataset

# Hmmm. What's best practice for loading %>% in packages? What's best practice for package dependencies?
library(metabroom)



# Check all is as it should be.
example_ma %>% 
  metafor::forest()

augment

example_ma %>% augment()
#> # A tibble: 9 x 7
#>   .rownames             y .fitted .se.fit conf.low.fit conf.high.fit .resid
#>   <fct>             <dbl>   <dbl>   <dbl>        <dbl>         <dbl>  <dbl>
#> 1 Edinburgh        -0.355  -0.358   0.113       -0.581        -0.136  0.182
#> 2 Orpington-Mild   -0.348  -0.362   0.245       -0.843         0.118  0.189
#> 3 Orpington-Moder… -2.32   -2.22    0.209       -2.63         -1.81  -1.78 
#> 4 Orpington-Severe -1.89   -1.66    0.369       -2.38         -0.937 -1.35 
#> 5 Montreal-Home    -0.384  -0.416   0.409       -1.22          0.386  0.153
#> 6 Montreal-Transf…  0.172   0.141   0.188       -0.229         0.510  0.709
#> 7 Newcastle         0.272   0.215   0.238       -0.251         0.681  0.809
#> 8 Umea             -0.425  -0.427   0.121       -0.664        -0.190  0.113
#> 9 Uppsala           0.290   0.253   0.187       -0.113         0.619  0.827

tidy

example_ma %>% tidy()
#> # A tibble: 10 x 8
#>    study      type  estimate std.error statistic p.value conf.low conf.high
#>    <chr>      <chr>    <dbl>     <dbl>     <dbl>   <dbl>    <dbl>     <dbl>
#>  1 Edinburgh  study   -0.355     0.114    -3.11  NA       -0.579    -0.131 
#>  2 Orpington… study   -0.348     0.254    -1.37  NA       -0.846     0.150 
#>  3 Orpington… study   -2.32      0.214   -10.8   NA       -2.74     -1.90  
#>  4 Orpington… study   -1.89      0.401    -4.71  NA       -2.67     -1.10  
#>  5 Montreal-… study   -0.384     0.453    -0.847 NA       -1.27      0.504 
#>  6 Montreal-… study    0.172     0.192     0.896 NA       -0.204     0.549 
#>  7 Newcastle  study    0.272     0.245     1.11  NA       -0.209     0.753 
#>  8 Umea       study   -0.425     0.122    -3.48  NA       -0.664    -0.186 
#>  9 Uppsala    study    0.290     0.190     1.52  NA       -0.0837    0.663 
#> 10 overall    summ…   -0.537     0.309    -1.74   0.0818  -1.14      0.0679

glance

example_ma %>% glance()
#> # A tibble: 1 x 16
#>       k measure method i.squared h.squared tau.squared tau.squared.se    QE
#>   <int> <fct>   <fct>      <dbl>     <dbl>       <dbl>          <dbl> <dbl>
#> 1     9 SMD     REML        95.5      22.2       0.791          0.428  124.
#> # … with 8 more variables: QE_p <dbl>, QM <dbl>, QM_p <dbl>, logLik <dbl>,
#> #   deviance <dbl>, AIC <dbl>, BIC <dbl>, AICc <dbl>


softloud/metabroom documentation built on May 29, 2019, 9:38 a.m.