dr_plot_vfun: Plot the fitted variance function

View source: R/plot.R

dr_plot_vfunR Documentation

Plot the fitted variance function

Description

Draws the fitted residual between-study variance against the design index, with study-level fitted variances overlaid. By default the curve is drawn only over the observed range of the design index, since the fitted function outside that range is an extrapolation.

Usage

dr_plot_vfun(
  object,
  extrapolate = FALSE,
  col_curve = "#D6604D",
  col_pts = "#2166AC",
  xlab = "Design robustness",
  ylab = "Fitted tau^2",
  main = "Fitted variance function",
  ...
)

Arguments

object

A fitted drmeta object.

extrapolate

If TRUE, draw the curve over the whole interval [0, 1] and shade the region beyond the observed support. Default FALSE.

col_curve

Colour of the fitted curve.

col_pts

Colour of the study-level points.

xlab, ylab, main

Axis labels and title.

...

Further arguments passed to plot.

Value

Invisibly, the data frame of plotted grid values.

Examples

path <- system.file("extdata", "bcg_design_robustness.csv", package = "drmeta")
bcg <- utils::read.csv(path)
fit <- drmeta(yi = bcg[["yi"]], vi = bcg[["vi"]], dr = bcg[["dr"]])
dr_plot_vfun(fit)

drmeta documentation built on Aug. 25, 2026, 1:08 a.m.