plot_curvature: Plot Dose-Varying Fragility (Curvature-Based Sensitivity)

View source: R/meditcv.R

plot_curvatureR Documentation

Plot Dose-Varying Fragility (Curvature-Based Sensitivity)

Description

Three-panel visualisation of dose-varying fragility: (1) effect curve with CI bands and fragility zones, (2) local fragility index, (3) normalised curvature.

Usage

plot_curvature(x, estimand = "NIE", ref_dose = NULL, ...)

Arguments

x

Data frame from sensitivity_curvature().

estimand

Label for the estimand. Default "NIE".

ref_dose

Optional reference dose vertical line.

...

Ignored.

Value

A ggplot2 object.

Examples


data(sim_mediation)
  fit <- robustmediate(
    X ~ Z1 + Z2, M ~ X + Z1 + Z2, Y ~ X + M + Z1 + Z2,
    data = sim_mediation, R = 20, verbose = FALSE
  )
curv <- sensitivity_curvature(fit)
plot_curvature(curv, ref_dose = fit$meta$ref_dose)



RobustMediate documentation built on April 16, 2026, 5:08 p.m.