plot.gg_brier: Plot a 'gg_brier' object

View source: R/plot.gg_brier.R

plot.gg_brierR Documentation

Plot a gg_brier object

Description

Plot the time-resolved Brier score (default) or running CRPS for a survival forest, optionally overlaid with a 15-85 percent per-subject envelope.

Usage

## S3 method for class 'gg_brier'
plot(x, type = c("brier", "crps"), envelope = FALSE, ...)

Arguments

x

A gg_brier object.

type

Which series to plot: "brier" (default) or "crps".

envelope

Logical. When TRUE, overlays a ribbon spanning the 15th-85th percentile of per-subject Brier (or running CRPS) contributions at each time, around the overall line. When FALSE (default), draws the overall series only.

...

Extra arguments forwarded to geom_line().

Value

A ggplot object.

See Also

gg_brier, get.brier.survival

Examples

## Not run: 
data(pbc, package = "randomForestSRC")
rf <- randomForestSRC::rfsrc(Surv(days, status) ~ ., data = pbc,
                             nsplit = 10)
gg_dta <- gg_brier(rf)
plot(gg_dta)
plot(gg_dta, type = "crps")
plot(gg_dta, envelope = TRUE)   # adds 15-85% envelope

## End(Not run)


ggRandomForests documentation built on May 12, 2026, 5:07 p.m.