[R] z to r transformation within print.rma.uni and forest from the package metafor
Viechtbauer Wolfgang (STAT)
Wolfgang.Viechtbauer at STAT.unimaas.nl
Fri Dec 4 17:06:20 CET 2009
Dear Sebastian,
Glad to hear you find the package useful.
Before I get to your questions, just as an aside - you can leave default arguments out of the call. So:
MAergebnis<-rma.uni(ri=PosOutc, ni=N, data=dm,
slab=c(dm$Article, dm$StudyNo), measure="ZCOR", method="DL")
would do exactly the same as your call.
As for your questions:
a) Correct. The tau2 argument is only there if you want to fix tau2 to a particular value (e.g., for sensitivity analyses). If tau2=NULL (the default), then tau2 is estimated from the data. Hmmm, I see how tau2=NULL could be misleading. Maybe I should change the default to something else.
b) Correct.
c) Correct (i.e., 1/(ni-3)).
d) And again correct.
e) Correct. Since the meta-analysis is conducted on the transformed values, they are also stored in the model object. The results shown (e.g., the model intercept) is the estimated value of mu in the transformed units.
Now, if you want the estimated value of mu in correlation units, use:
predict(MAergebnis, transf=transf.ztor)
When you draw a forest plot and you want to show the study results in correlation units (and not the transformed units), you have two options:
forest(MAergebnis, transf=transf.ztor)
will backtransform the transformed values (and the corresponding CI bounds). Since this is not a linear transformation, the CIs will not be symmetric.
Alternatively, you can use:
forest(MAergebnis, atransf=transf.ztor)
which will transform the x-axis appropriately so that you do get symmetric CIs (but a non-linear x-axis).
So, try out:
forest(MAergebnis)
forest(MAergebnis, transf=transf.ztor)
forest(MAergebnis, atransf=transf.ztor)
and see how the plot changes to better understand this.
I hope this helps!
Best,
--
Wolfgang Viechtbauer http://www.wvbauer.com/
Department of Methodology and Statistics Tel: +31 (0)43 388-2277
School for Public Health and Primary Care Office Location:
Maastricht University, P.O. Box 616 Room B2.01 (second floor)
6200 MD Maastricht, The Netherlands Debyeplein 1 (Randwyck)
----Original Message----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Sebastian Stegmann Sent: Friday, December 04, 2009 14:28
To: r-help at r-project.org
Subject: [R] z to r transformation within print.rma.uni and forest from the
package metafor
> Dear R community,
>
> I'm using the ,metafor'-package by Wolfgang Viechtbauer (Version: 0.5-5)
> to calculate random-effects meta-analyses using Correlations and Sample
> Sizes as the raw data.
>
> (By the way: Really a nice piece of work, Wolfgang! Thanks heaps.)
>
> I specified the "rma.uni' function so that it looks like this:
>
> MAergebnis<-rma.uni(ri=PosOutc, ni=N,
> mods=NULL,
> data=dm, intercept=TRUE, slab=c(dm$Article, dm$StudyNo),
> subset=NULL, measure="ZCOR", add=1/2, to="only0",
> vtype="LS",
> method="DL", weighted=TRUE, level=95, digits=4, btt=NULL,
> tau2=NULL, knha=FALSE, control=list())
>
> With PosOutc being the column containing the raw correlations and N being
> the column with the sample sizes.
>
> I assume that this will imply that
>
> a) although the 'tau2' value is set to NULL, still a random-effects
> analysis is calculated
>
> b) the raw correlation coefficients are transformed to fisher-z-values
>
> c) the according variances of the fisher-z-values are calculated from the
> sample sizes
>
> d) these calculated z-values and sample sizes are then used to calculate
> summary effect and confidence interval limits
>
> e) the resulting object contains z-values and not raw correlations
>
>
> Now, the problem is:
>
> How do I get the calculated results back into the form of raw correlation
> coefficients? (In order to report them in an article.)
>
> I see two cases, where this might be relevant:
>
> A) When reporting numeric results:
>
> I tried the following:
>
> print.rma.uni(MAergebnis, transf="transf.ztor")
>
> but then noticed that the following will bring up the same result:
>
> print.rma.uni(MAergebnis)
>
> (When using the "z2r" and "r2z" functions out of the
> "psychometric"-package on the separate numbers, the values change, so it
> can't simply be a matter of rounding.)
>
> B) When drawing a forest plot:
>
> forest(MAergebnis, ., transf="transf.ztor", .)
>
> should to the trick, right?
>
> Does anyone have any experience or greater insight knowledge regarding
> this little problem?
>
> Best regards
>
> Sebastian
More information about the R-help
mailing list