metafor (version 3.0-2)

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 to specify the directory for creating the report. If unspecified, tempdir will be used.

filename

optional character string to specify the filename (without file extension) for the report. If unspecified, 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 to specify whether the report should be opened after it has been generated (the default is TRUE). See ‘Note’.

digits

integer to specify 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

either a logical which will suppress the drawing of the forest plot when set to FALSE or a character string with arguments to be added to the call to forest.rma for generating the forest plot.

funnel

either a logical which will suppress the drawing of the funnel plot when set to FALSE or a character string with arguments to be added to the call to funnel.rma for generating the funnel plot.

footnotes

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

verbose

logical to specify whether information on the progress of the report generation should be provided (the 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 effect sizes or 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. By default, a forest plot and a funnel plot are also provided (these can be suppressed by setting forest=FALSE and/or funnel=FALSE).

References

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

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=""))

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

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

Run the code above in your browser using DataLab