Dipl. Kfm Dominik Wagner MSc; MSc
2014-Apr-22 10:56 UTC
[R] metafor - rstudent(res) - omitted rows
Dear all, I am quite new to R. Now my following easy question. I use metafor and performed an outlier test with rstudent(res). This is resulting in 1000 rows of 1578 and 578 omitted rows (starting with row 598). 1. How can I display all 1578 rows in R-studio? Because in the standardized residual plot it starts with study 1 (see attachment). In R-studio with row 598. 2. How can I just plot the standardized residuals with manipulated x-axis to see every single study? Thank you very much for your help. Cordially Dominik -- _________________________________________________ *Dipl.-Kfm. Dominik Wagner MSc. MSc.* -------------- next part -------------- A non-text attachment was scrubbed... Name: Rplot.pdf Type: application/pdf Size: 353039 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20140422/d7862a00/attachment-0002.pdf>
Viechtbauer Wolfgang (STAT)
2014-Apr-22 14:05 UTC
[R] metafor - rstudent(res) - omitted rows
I think this may help: http://www.metafor-project.org/doku.php/tips:handling_missing_data I am not sure I understand your second question. All studies are shown (for which the standardized residual can be computed), but since there are so many studies, these plots are not really all that helpful. If you only want to plot the standardized residuals, then you could start with: options(na.action = "na.pass") sav <- rstandard(res) plot(sav$slab, sav$z, pch=19, cex=.4, type="o") and just start tweaking this. You will have to reduce the size of the axis annotations (look into cex.axis), probably make them vertically aligned (las), and stretch that plot very wide if you want to make out individual points. Look into help(par) for more details cex.axis and las, and help(Devices) for setting up a much wider plot. Best, Wolfgang -- Wolfgang Viechtbauer, Ph.D., Statistician Department of Psychiatry and Psychology School for Mental Health and Neuroscience Faculty of Health, Medicine, and Life Sciences Maastricht University, P.O. Box 616 (VIJV1) 6200 MD Maastricht, The Netherlands +31 (43) 388-4170 | http://www.wvbauer.com> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] > On Behalf Of Dipl. Kfm Dominik Wagner MSc; MSc > Sent: Tuesday, April 22, 2014 12:56 > To: r-help at r-project.org > Subject: [R] metafor - rstudent(res) - omitted rows > > Dear all, > > I am quite new to R. Now my following easy question. > > I use metafor and performed an outlier test with rstudent(res). > This is resulting in 1000 rows of 1578 and 578 omitted rows (starting > with > row 598). > > > 1. How can I display all 1578 rows in R-studio? Because in the > standardized residual plot it starts with study 1 (see attachment). In > R-studio with row 598. > 2. How can I just plot the standardized residuals with manipulated > x-axis to see every single study? > > > Thank you very much for your help. > > Cordially > > Dominik > > -- > > _________________________________________________ > > > *Dipl.-Kfm. Dominik Wagner MSc. MSc.*
At 11:56 22/04/2014, Dipl. Kfm Dominik Wagner MSc; MSc wrote:>Dear all, > >I am quite new to R. Now my following easy question. > >I use metafor and performed an outlier test with rstudent(res). >This is resulting in 1000 rows of 1578 and 578 omitted rows (starting with >row 598). > > > 1. How can I display all 1578 rows in R-studio? Because in the > standardized residual plot it starts with study 1 (see attachment). In > R-studio with row 598. > 2. How can I just plot the standardized residuals with manipulated > x-axis to see every single study?I cannot help with your Rstudio probelm as I do not use it but as far as your plotting question is concerned: 1 - do you really want to see all of the residuals? Why not just keep the ones outside the range -2 to +2 which you might then need to study further 2 - the pictures would probably be clearer if you identify and do not print out the two studies with r very close to -1 as they are compressing everything else 3 - hollow circles are often a good idea when you have overprinting.>Thank you very much for your help. > >Cordially > >Dominik > >-- > >_________________________________________________ > > >*Dipl.-Kfm. Dominik Wagner MSc. MSc.* > >Content-Type: application/pdf; name="Rplot.pdf" >Content-Disposition: attachment; filename="Rplot.pdf" >X-Attachment-Id: f_hub2q8dv0Michael Dewey info at aghmed.fsnet.co.uk http://www.aghmed.fsnet.co.uk/home.html