[R] How do I print predicted effect sizes in forest plot?

Viechtbauer Wolfgang (STAT) wolfgang.viechtbauer at maastrichtuniversity.nl
Fri Dec 6 12:00:09 CET 2013


One more thing ... You used the command:

iat_result = rma(yi=Mean, vi=Variance_rounded, ni=N, sei=Std_error, slab=Study_Name, subset=(Country == "AUT"), data=cma_iat, method="HS")

This probably does not do what you want it to do. First of all, if you specify vi, there is no need to specify sei (or vice-versa). One is sufficient. But more crucially, I assume 'Mean' is what it says it is - a mean of a certain variable X. And I assume that 'Variance_rounded' is the variance of said variable X. But vi is used to specify the *sampling variance* of yi (or sei is used to specify the standard error), which, for a mean, is the variance divided by N (and the standard error is the SD divided by the square root of N):

http://en.wikipedia.org/wiki/Standard_error_of_the_mean#Standard_error_of_the_mean

So, my hunch is that you are not supplying the right information to the rma() function.

Best,
Wolfgang 

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
> On Behalf Of Alma Wilflinger
> Sent: Thursday, December 05, 2013 22:06
> To: R help <r-help at r-project.org>
> Subject: [R] How do I print predicted effect sizes in forest plot?
> 
> Hi,
> 
> I am struggling a bit with creating a forest plot containing the predicted
> effect size. As seen in other studies these effect sizes are shown per
> study usually as a light grey diamond - which is what I want to achieve.
> 
> The calls I use are:
> iat_result = rma(yi=Mean, vi=Variance_rounded, ni=N, sei=Std_error,
> slab=Study_Name, subset=(Country == "AUT"), data=cma_iat, method="HS")
> 
> summary.rma(iat_result)
> 
> 
> #not sure how to use it or if needed
> #predict(iat_result)
> 
> forest(iat_result)
> 
> 
> At the end I am getting the forest plot as is without the predicted
> values.
> 
> I am not sure if I need the predict function and how to use it? - the
> predict function deliveres the same values as already computed in the rma
> object.
> 
> 
> I checked the manual for package metafor but was not able to find out how
> to print the predicted values per study.
> 
> 
> kind regards, Alma
> 	[[alternative HTML version deleted]]



More information about the R-help mailing list