metafor (version 2.4-0)

reporter: Dynamically Generated Analysis Reports for 'rma.uni' Objects

Description

The function dynamically generates analysis reports for objects of class "rma.uni".

Usage

reporter(x, …)

# S3 method for rma.uni reporter(x, dir, filename, format="html_document", open=TRUE, digits, forest, funnel, footnotes=FALSE, verbose=TRUE, …)

Arguments

x

an object of class "rma.uni".

dir

optional character string specifying the directory for creating the report (by default, tempdir will be used).

filename

optional character string specifying the filename (without file extension) for the report (by default, the function sets a filename automatically).

format

output format for the report (either html_document, pdf_document, or word_document). Can be abbreviated. See ‘Note’.

open

logical indicating whether the report should be opened after it has been generated (default is TRUE). See ‘Note’.

digits

integer specifying the number of decimal places to which the printed results should be rounded (if unspecified, the default is to take the value from the object).

forest

optional character string with arguments to be added to the call to forest.rma for generating the forest plot.

funnel

optional character string with arguments to be added to the call to funnel.rma for generating the funnel plot.

footnotes

logical indicating whether additional explanatory footnotes should be added to the report (default is FALSE).

verbose

logical indicating whether information on the progress of the report generation should be provided (default is TRUE).

other arguments.

Value

The function generates either a html, pdf, or docx file and returns (invisibly) the path to the generated document.

Details

The function dynamically generates an analysis report based on the model object. The report includes information about the model that was fitted, the distribution of the observed outcomes, the estimate of the average outcome based on the fitted model, tests and statistics that are informative about potential (residual) heterogeneity in the outcomes, checks for outliers and/or influential studies, and tests for funnel plot asymmetry. A forest plot and a funnel plot are also provided.

References

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

See Also

rma.uni

Examples

Run this code
# NOT RUN {
### copy BCG vaccine data into 'dat'
dat <- dat.bcg

### calculate log risk ratios and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat,
              slab=paste(author, ", ", year, sep=""))

### random-effects model
res <- rma(yi, vi, data=dat)

# }
# NOT RUN {
### generate pdf report
reporter(res)
# }

Run the code above in your browser using DataCamp Workspace