"escalc"
.## 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,
append=TRUE, replace=TRUE, level=95, digits, transf=FALSE, ...)
## S3 method for class 'summary.escalc':
print(x, digits, \dots)
"escalc"
or "summary.escalc"
."escalc"
.object
argument should be returned together with the additional variables that are calculated by the summary
function (default is TRUE
).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=
transf=exp
). Defaults to FALSE
, which means that no transformation is used (any additional arguprint.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 of class c("summary.escalc","data.frame")
. The object is a data frame containing the original data (if append=TRUE
) and the following components:transf
is not FALSE
).yi/sei
).transf
is not FALSE
).transf
is not FALSE
).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.summary.escalc
function formats and prints the data frame.escalc
### 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