Learn R Programming

psychmeta (version 2.3.4)

plot_forest: Create forest plots

Description

Create forest plots

Usage

plot_forest(ma_obj, analyses = "all", match = c("all", "any"),
  case_sensitive = TRUE, show_filtered = FALSE,
  ma_facetname = "Summary", facet_levels = NULL, conf_level = 0.95,
  conf_method = "t", x_limits = NULL, x_breaks = NULL,
  x_lab = NULL, y_lab = "Reference")

Arguments

ma_obj

Meta-analysis object.

analyses

Which analyses to extract? Can be either "all" to extract references for all meta-analyses in the object (default) or a list containing arguments for [filter_ma].

match

Should extracted meta-analyses match all (default) or any of the criteria given in analyses?

case_sensitive

Logical scalar that determines whether character values supplied in analyses should be treated as case sensitive (TRUE, default) or not (FALSE).

show_filtered

Logical scalar that determines whether the meta-analysis object given in the output should be the modified input object (FALSE, default) or the filtered object (TRUE).

ma_facetname

Label to use for meta-analysis results in the facet_grid() function from ggplot2.

facet_levels

Order in which moderator levels should be displayed.

conf_level

Confidence level to define the width of the confidence interval (default = .95).

conf_method

Distribution to be used to compute the width of confidence intervals. Available options are "t" for t distribution or "norm" for normal distribution.

x_limits

Span of the X values to be plotted.

x_breaks

Breaks for the X values to be plotted.

x_lab

Label to use for the X axis.

y_lab

Label to use for the Y axis.

Value

A list of forest plots.

Examples

Run this code
# NOT RUN {
ma_obj <- ma_r(ma_method = "ic", rxyi = rxyi, n = n, rxx = rxxi, ryy = ryyi,
               construct_x = x_name, construct_y = y_name, sample_id = sample_id,
               moderators = moderator, data = data_r_meas_multi)
plot_forest(ma_obj = ma_obj)
plot_forest(ma_obj = ma_obj, analyses = list(pair_id = 2))
plot_forest(ma_obj = ma_obj, analyses = list(pair_id = 1), show_filtered = TRUE)

## d values
ma_obj <- ma_d(ma_method = "ic", d = d, n1 = n1, n2 = n2, ryy = ryyi,
               construct_y = construct, sample_id = sample_id,
               data = data_d_meas_multi)
plot_forest(ma_obj = ma_obj)
plot_forest(ma_obj = ma_obj, analyses = list(pair_id = 2))
plot_forest(ma_obj = ma_obj, analyses = list(pair_id = 1, analysis_id = 1), show_filtered = TRUE)
# }

Run the code above in your browser using DataLab