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

use parameters to tidy up meta-analysis results #21

Closed
IndrajeetPatil opened this issue Jan 25, 2020 · 2 comments
Closed

use parameters to tidy up meta-analysis results #21

IndrajeetPatil opened this issue Jan 25, 2020 · 2 comments

Comments

@IndrajeetPatil
Copy link
Owner

library(metafor)
#> Loading required package: Matrix
#> Loading 'metafor' package (version 2.1-0). For an overview 
#> and introduction to the package please type: help(metafor).
library(ggstatsplot)
#> Registered S3 method overwritten by 'broom.mixed':
#>   method      from 
#>   tidy.gamlss broom
#> Registered S3 methods overwritten by 'car':
#>   method                          from
#>   influence.merMod                lme4
#>   cooks.distance.influence.merMod lme4
#>   dfbeta.influence.merMod         lme4
#>   dfbetas.influence.merMod        lme4

### calculate log risk ratios and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)

### random-effects model, using log risk ratios and variances as input
### note: method="REML" is the default, so one could leave this out
x <- rma(yi, vi, data=dat, method="REML")

# setup
ggstatsplot:::parameters_tidy(x) %>%
  dplyr::filter(., !grepl(x = term, pattern = "Study", ignore.case = TRUE))

#> # A tibble: 1 x 8
#>   term        estimate std.error conf.low conf.high statistic   p.value weight
#>   <chr>          <dbl>     <dbl>    <dbl>     <dbl>     <dbl>     <dbl>  <dbl>
#> 1 (Intercept)   -0.715     0.180    -1.07    -0.362     -3.97 0.0000705     NA
@IndrajeetPatil
Copy link
Owner Author

Use broomExtra::tidy_parameters instead. But this has to wait until broom devel makes it to CRAN, which might not happen any time soon.

@IndrajeetPatil
Copy link
Owner Author

Also, for metaplus
easystats/parameters#266

IndrajeetPatil added a commit that referenced this issue Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant