Learn R Programming

metafor (version 0.5-0)

qqnorm.rma.uni: Normal QQ Plot for rma Objects

Description

Function to create normal QQ plots for objects of class "rma.uni", "rma.mh", and "rma.peto".

Usage

## S3 method for class 'rma.uni':
qqnorm(y, type="rstandard", pch=19, envelope=TRUE, level=y$level, 
       reps=1000, smooth=TRUE, bass=0, ...)
## S3 method for class 'rma.mh':
qqnorm(y, type="rstandard", pch=19, ...)
## S3 method for class 'rma.peto':
qqnorm(y, type="rstandard", pch=19, ...)

Arguments

y
an object of class "rma.uni", "rma.mh", or "rma.peto".
type
either "rstandard" (default) or "rstudent" indicating whether the usual or deleted residuals should be used in creating the plot. See Details.
pch
plotting symbol to use for the observed effect sizes or outcomes. By default, a solid circle is used. See points for other options.
envelope
logical indicating whether a pseudo confidence envelope should be simulated and added to the plot (default is TRUE)). Only for objects of class "rma.uni". See Details.
level
numerical value between 0 and 100 specifying the level of the pseudo confidence envelope (the default is to take the value from the object).
reps
numerical value indicating the number of iterations to use for simulating the pseudo confidence envelope (default is 1000).
smooth
logical indicating whether the results from the simulation should be smoothed (default is TRUE).
bass
numerical value that controls the degree of smoothing (default is 0).
...
other arguments.

Details

The plot shows the theoretical quantiles of a normal distribution against the observed quantiles for either the standardized residuals (type="rstandard") or the externally standardized residuals (type="rstudent"). For reference, a line is added to the plot with slope of 1, going through the (0,0) point. For objects of class "rma.uni", it is also possible to add a pseudo confidence envelope to the plot. The method generates sets of pseudo residuals from the given model, which are then used to create the envelope (for details, see Cook & Weisberg, 1982). The number of sets simulated can be controlled with the reps argument. When smooth=TRUE, the simulated bounds are smoothed with Friedman's SuperSmoother (see supsmu). The bass argument can be set to a number between 0 and 10, with higher numbers indicating increasing smoothness.

References

Cook, R. D. & Weisberg, S. (1982) Residuals and influence in regression. London: Chapman and Hall.

See Also

rma.uni, rma.mh, rma.peto

Examples

Run this code
### load BCG vaccine data
data(dat.bcg)

### meta-analysis of the log risk rates using a random-effects model
res <- rma(ai=tpos, bi=tneg, ci=cpos, di=cneg, 
           data=dat.bcg, measure="RR", method="REML")
qqnorm(res)

### mixed-effects model with absolute latitude as a moderator
res <- rma(ai=tpos, bi=tneg, ci=cpos, di=cneg, mods=ablat, 
           measure="RR", data=dat.bcg, method="REML")
qqnorm(res)

Run the code above in your browser using DataLab