Learn R Programming

metagam (version 0.2.0)

plot_heterogeneity: Heterogeneity Plot

Description

Heterogeneity Plot

Usage

plot_heterogeneity(
  x,
  axis = NULL,
  term = NULL,
  type = "Q",
  alpha_thresh = 0.05
)

Arguments

x

Object returned by metagam.

axis

Character specifying which variable to plot. Defaults to NULL; if x was fitted with a single term, the explanatory variable corresponding to this term is selected.

term

Character specifying which smooth term to plot. Defaults to NULL; if x was fitted with a single term, this one is taken.

type

Character specifying which type of plot. Either "Q" for the test statistic or "p" for the p-value. Defaults to "Q".

alpha_thresh

Significance level. Defaults to .05.

Value

A ggplot object.

Details

This plot visualizes the heterogeneity along the given axis, using Cochran's Q test.

Examples

Run this code
# NOT RUN {
# See the vignette, either at https://lifebrain.github.io/metagam/articles/heterogeneity.html
# or by typing the following in the console:
# vignette("heterogeneity")


# }

Run the code above in your browser using DataLab