Skip to contents

Extracts coefficient functions and approximate confidence bands from a fitted refund::pffr() model and returns a faceted ggplot2 visualization.

Usage

plot_functional_on_scalar(
  model,
  ci_level = 0.95,
  title = "Function-on-scalar coefficient functions",
  xlab = "Time",
  ylab = "Coefficient function",
  highlight_intervals = NULL
)

Arguments

model

A fitted pffr model returned by functional_on_scalar() or directly by refund::pffr().

ci_level

Confidence level used to form approximate pointwise bands.

title

Plot title.

xlab

Label for the x-axis.

ylab

Label for the y-axis.

highlight_intervals

Optional data frame with start and end columns used to shade one or more intervals.

Value

A faceted ggplot2 object.