print.escalc | R Documentation |
Function to print objects of class "escalc"
(and to obtain inferences for the individual studies/rows in such an object). \loadmathjax
## S3 method for class 'escalc'
print(x, digits=attr(x,"digits"), ...)
## S3 method for class 'escalc'
summary(object, out.names=c("sei","zi","pval","ci.lb","ci.ub"), var.names,
H0=0, append=TRUE, replace=TRUE, level=95, olim, digits, transf, ...)
x |
an object of class |
object |
an object of class |
digits |
integer to specify the number of decimal places to which the printed results should be rounded (the default is to take the value from the object). |
out.names |
character string with four elements to specify the variable names for the standard errors, test statistics, and lower/upper confidence interval bounds. |
var.names |
character string with two elements to specify the variable names for the observed effect sizes or outcomes and the sampling variances (the default is to take the value from the object if possible). |
H0 |
numeric value to specify the value of the effect size or outcome under the null hypothesis (the default is 0). |
append |
logical to specify whether the data frame specified via the |
replace |
logical to specify whether existing values for |
level |
numeric value between 0 and 100 to specify the confidence interval level (the default is 95; see here for details). |
olim |
optional argument to specify observation/outcome limits. If unspecified, no limits are used. |
transf |
optional argument to specify a function to transform the observed effect sizes or outcomes and interval bounds (e.g., |
... |
other arguments. |
The print.escalc
function formats and prints the data frame, so that the observed effect sizes or 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:
yi |
observed effect sizes or outcomes (transformed if |
vi |
corresponding sampling variances. |
sei |
corresponding standard errors. |
zi |
test statistics for testing \mjeqn\mboxH_0:\; \theta_i = \mboxH0H_0: \theta_i = H0 (i.e., |
pval |
corresponding p-values. |
ci.lb |
lower confidence interval bounds (transformed if |
ci.ub |
upper confidence interval bounds (transformed if |
When the transf
argument is specified, elements vi
, sei
, zi
, and pval
are not included (since these only apply to the untransformed effect sizes or outcomes).
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.
If some transformation function has been specified for the transf
argument, then yi
, ci.lb
, and ci.ub
will be transformed accordingly. However, vi
and sei
then still reflect the sampling variances and standard errors of the untransformed values.
The summary.escalc
function computes level
% Wald-type confidence intervals, which may or may not be the most accurate method for computing confidence intervals for the chosen effect size or outcome measure.
If the outcome measure used is bounded (e.g., correlations are bounded between -1 and +1, proportions are bounded between 0 and 1), one can use the olim
argument to enforce those observation/outcome limits (the observed outcomes and confidence intervals cannot exceed those bounds then).
Wolfgang Viechtbauer wvb@metafor-project.org https://www.metafor-project.org
Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1–48. https://doi.org/10.18637/jss.v036.i03
escalc
for the function to create escalc
objects.
### calculate log risk ratios 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.