guido-s / meta

Official Git repository of R package meta
http://cran.r-project.org/web/packages/meta/index.html
GNU General Public License v2.0
82 stars 32 forks source link

Print p-values in forest from metainf #5

Closed fmmattioni closed 6 years ago

fmmattioni commented 6 years ago

Dear Prof. Schwarzer,

Thank you very much for this great package. I would like to know how I could print the p-values in a forest plot from metainf.

If I print the metainf results I get MD, 95%-CI, p-value, tau^2, and I^2. However, if I use a forest plot to visualize the results I only get MD and 95%-CI.

Thank you.

guido-s commented 6 years ago

Dear Felipe,

This feature is not implemented in the forest function (at the moment). However, you can use the attached R code as a work around.

Best wishes, Guido forest-metainf01.txt

fmmattioni commented 6 years ago

This is great!

Thank you for the code. Very much appreciated!

Best,

Felipe

fmmattioni commented 6 years ago

Just a quick question I have been struggling with:

Is there a way to get these additional columns (p-value, tau^2, and I^2) for the overall effect at the bottom of the forest plot? Example:

forest-metainf01

Thank you!

Felipe

guido-s commented 6 years ago

This is not possible at the moment. I will put this on my TODO list.

fmmattioni commented 6 years ago

Thanks for the feedback!

I thought it would be useful to compare the LOOCV results to the overall effect in a single place like this. Thank you again for this great package!

Best,

Felipe

guido-s commented 2 years ago

I finally had time to implement this feature.

andygxzeng commented 2 years ago

Thanks so much for implementing this - would it be possible to have this option for visualizing the results of metagen as well? I'm specifically interested in displaying the overall P-value for the fixed or random effects model

Best, Andy

guido-s commented 2 years ago

You can print the p-value of the test for overall effect using argument 'test.overall', 'test.overall.fixed' and 'test.overall.random'.

Or would you like to add a column with p-values for individual studies as well as meta-analysis results?

andygxzeng commented 2 years ago

Hi Guido,

Sorry about the delayed reply on this, in line with the feature request above I am referring to the column with the p-values for individual studies which does not currently extend to the meta-analysis results after running forest.meta on the output from metagen:

image

We have had no problem getting the overall p-values from the meta-analysis, but have been adding it in manually to the plot for figure generation. Hopefully this would be a useful feature for others looking to prepare their meta-analysis results for publication

Thanks so much, Andy

guido-s commented 2 years ago

Hi Andy,

I changed forest.meta() accordingly.

E.g., forest(metagen(-2:2, 1:5 / 5, sm = "MD"), leftcols = FALSE, rightcols = c("effect", "ci", "pval"))

Best, Guido