[R-meta] Show study labels
Raynaud Armstrong
r@yn@ud@@rm@trong @ending from gm@il@com
Wed Aug 15 16:53:21 CEST 2018
Dear Viechtbauer,
Thank you so much for reply. I got the following messages -
*metavahe <- rma(yi=fisherz, sei=stderr, data=vahe,
slab=paste(vahe$studyID))*
Error in rma(yi = fisherz, sei = stderr, data = vahe, slab =
paste(vahe$studyID)) :
Study labels not of same length as data.
*> forest(metavahe, showweights=TRUE, xlab='Pooled Estimate of Fisher Z
Scores', order="obs", slab=paste(vahe$studyID))*
Error in forest.rma(metavahe, showweights = TRUE, xlab = "Pooled Estimate
of Fisher Z Scores", :
Number of outcomes does not correspond to the length of the 'slab'
arguemnt.
How can I get the study labels to be of the same length as data?
Looking forward to your reply,
Ray
On Tue, Aug 14, 2018 at 5:01 PM, Viechtbauer, Wolfgang (SP) <
wolfgang.viechtbauer using maastrichtuniversity.nl> wrote:
> Dear Ray,
>
> Please give your post an appropriate subject (I've added one in my reply).
>
> Also please post in plain text. The formatting can get all screwed up when
> posting in HTML (I've fixed that below in my reply).
>
> Finally, a fully reproducible example would make it easier to provide help.
>
> Based on what you show, the error should not occur. This runs without
> error:
>
> vahe <- read.table(header=TRUE, text = "
> studyID corr fisherz stderr
> 'Nicks et al., 2013' 0.05 0.05 0.1
> 'Fedro et al., 2013' 0.4 0.42 0.1
> 'Bonnes et al., 2013' 0.2 0.2 0.05
> 'Sylvi et al., 2014' 0.14 0.14 0.06
> 'Trente et al., 2015' 0.23 0.23 0.09
> 'Martin et al., 2003' 0.17 0.2 0.05
> 'Margolin-Angel et al., 2002' 0.26 0.3 0.1
> 'Livingstone et al., 2008' 0.025 0.03 0.05
> 'Brack et al., 2011' 0.026 0.03 0.09
> 'Robinson-Papp et al., 2008' 0.202 0.2 0.06
> 'Bicker et al., 2015' 0.0037 0.003 0.09
> 'Lister et al., 2007' 0.049 0.05 0.07
> 'Melody et al., 2011' 0.24 0.2 0.11
> 'Wheels et al., 2008' 0.2 0.2 0.13
> 'Thames et al., 2011' -0.22 -0.2 0.09
> 'Ringer et al., 2000' -0.16 -0.16 0.12
> 'Mellow et al., 2013' -0.52 -0.6 0.1")
>
> metavahe <- rma(yi=fisherz, sei=stderr, data=vahe)
>
> forest(metavahe, showweights=TRUE, xlab='Pooled Estimate of Fisher Z
> Scores', order="obs", slab=paste(vahe$studyID))
>
> My guess is that 'vahe' includes one or more additional rows that you are
> not showing. But you could also do:
>
> metavahe <- rma(yi=fisherz, sei=stderr, data=vahe,
> slab=paste(vahe$studyID))
>
> forest(metavahe, showweights=TRUE, xlab='Pooled Estimate of Fisher Z
> Scores', order="obs")
>
> Then you will also get the study labels in the forest plot and extra rows
> won't cause any problems.
>
> Best,
> Wolfgang
>
> -----Original Message-----
> From: Raynaud Armstrong [mailto:raynaud.armstrong using gmail.com]
> Sent: Tuesday, 14 August, 2018 21:47
> To: r-sig-meta-analysis using r-project.org; Viechtbauer, Wolfgang (SP)
> Subject: Re: Show study labels
>
> Hi everyone!
> Here's my hypothetical data which I am working on for a meta-analysis
> assignment. I transformed correlation coefficients to Fisher's Z manually.
> Then used metafor in R to get my pooled estimate of Z. I would like my
> forest plot to display the study references fully instead of the default
> 'Study 1,Study 12' format. Could you please validate my script format and
> help with the forest plot as I keep getting the error message shown below
> the following data? Thanks in advance!
>
> studyID corr fisherz stderr
> Nicks et al., 2013 0.05 0.05 0.1
> Fedro et al., 2013 0.4 0.42 0.1
> Bonnes et al., 2013 0.2 0.2 0.05
> Sylvi et al., 2014 0.14 0.14 0.06
> Trente et al., 2015 0.23 0.23 0.09
> Martin et al., 2003 0.17 0.2 0.05
> Margolin-Angel et al., 2002 0.26 0.3 0.1
> Livingstone et al., 2008 0.025 0.03 0.05
> Brack et al., 2011 0.026 0.03 0.09
> Robinson-Papp et al., 2008 0.202 0.2 0.06
> Bicker et al., 2015 0.0037 0.003 0.09
> Lister et al., 2007 0.049 0.05 0.07
> Melody et al., 2011 0.24 0.2 0.11
> Wheels et al., 2008 0.2 0.2 0.13
> Thames et al., 2011 -0.22 -0.2 0.09
> Ringer et al., 2000 -0.16 -0.16 0.12
> Mellow et al., 2013 -0.52 -0.6 0.1
>
> Output of my random effects model:
> metavahe <-rma(yi=fisherz, sei=stderr, data=vahe)
> > metavahe
>
> Random-Effects Model (k = 17; tau^2 estimator: REML)
>
> tau^2 (estimated amount of total heterogeneity): 0.0429 (SE = 0.0178)
> tau (square root of estimated tau^2 value): 0.2071
> I^2 (total heterogeneity / total variability): 88.27%
> H^2 (total variability / sampling variability): 8.52
>
> Test for Heterogeneity:
> Q(df = 16) = 98.2105, p-val < .0001
>
> Model Results:
>
> estimate se zval pval ci.lb ci.ub
> 0.0787 0.0545 1.4431 0.1490 -0.0282 0.1855
>
> ---
> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
>
> FOREST PLOT SCRIPT:
> forest(metavahe, showweights=TRUE, xlab='Pooled Estimate of Fisher Z
> Scores', order="obs")
> This gives me a plot with Study 1, Study 2 format.
> If I try the following, then it gives me an error: (vahe is the actual
> .csv file where I have my data)
>
> > forest(metavahe, showweights=TRUE, xlab='Pooled Estimate of Fisher Z
> Scores', order="obs", slab=paste(vahe$studyID))
> Error in forest.rma(metavahe, showweights = TRUE, xlab = "Pooled Estimate
> of Fisher Z Scores", :
> Number of outcomes does not correspond to the length of the 'slab'
> argument.
>
> I would like the full study references to be written out - What shall I do?
> Please let me know soon.
> Thanks,
> Ray
>
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis
mailing list