Learn R Programming

metafor (version 1.9-4)

print.escalc: Print and Summary Methods for 'escalc' Objects

Description

Print and summary methods for objects of class "escalc".

Usage

## S3 method for class 'escalc':
print(x, digits, \dots)

## S3 method for class 'escalc':
summary(object, out.names=c("sei","zi","ci.lb","ci.ub"), var.names,
        H0=0, append=TRUE, replace=TRUE, level=95, digits, transf, ...)

Arguments

x
an object of class "escalc".
object
an object of class "escalc".
digits
integer specifying the number of decimal places to which the printed results should be rounded (the default is to take the value from the object if possible).
out.names
character string with four elements, specifying the variable names for the standard errors, test statistics, and lower/upper confidence interval bounds.
var.names
character string with two elements, specifying the variable names for the observed outcomes and the sampling variances (the default is to take the value from the object if possible).
H0
numeric value specifying the value of the outcome under the null hypothesis.
append
logical indicating whether the data frame specified via the object argument should be returned together with the additional variables that are calculated by the summary function (default is TRUE).
replace
logical indicating whether existing values for sei, zi, ci.lb, and ci.ub in the data frame should be replaced or not. Only relevant when the data frame already contains these variables. If replace=
level
numerical value between 0 and 100 specifying the confidence interval level (the default is 95).
transf
optional argument specifying the name of a function that should be used to transform the observed outcomes and interval bounds (e.g., transf=exp). If unspecified, no transformation is used. Any additional arguments needed for the function spe
...
other arguments.

Value

  • The print.escalc function formats and prints the data frame, so that the observed outcomes and sampling variances are rounded (to the number of digits specified). The summary.escalc function creates an object that is a data frame containing the original data (if append=TRUE) and the following components:
  • yiobserved outcomes or effect size estimates (transformed if transf is not FALSE).
  • vicorresponding (estimated) sampling variances.
  • seistandard errors of the observed outcomes or effect size estimates.
  • zitest statistics for testing latex{$H_0: \theta_i = H0$}html{$H₀: \thetaᵢ = H0$}text{$H_0: \theta_i = H0$} (i.e., (yi-H0)/sei).
  • ci.lblower confidence interval bounds (transformed if transf is not FALSE).
  • ci.ubupper confidence interval bounds (transformed if transf is not FALSE).
  • Note that the actual variable names above depend on the out.names (and var.names) arguments. If the data frame already contains variables with names as specified by the out.names argument, the values for these variables will be overwritten when replace=TRUE (which is the default). By setting replace=FALSE, only values that are NA will be replaced. The print.escalc function again formats and prints the data frame, rounding the added variables to the number of digits specified.

References

Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1--48. http://www.jstatsoft.org/v36/i03/.

See Also

escalc

Examples

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

### calculate log relative risks and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)
dat

### apply summary function
summary(dat)
summary(dat, transf=exp)

Run the code above in your browser using DataLab