as_prediction_data: Extract prediction data in the common long format

View source: R/output-interop.R

as_prediction_dataR Documentation

Extract prediction data in the common long format

Description

Extract prediction data in the common long format

Usage

as_prediction_data(x, ...)

## S3 method for class 'polyreg'
as_prediction_data(
  x,
  exposure.level = x$estimand$code.exposure.ref,
  event = c("both", "event1", "event2"),
  ...
)

Arguments

x

Prediction data or a supported fitted model.

...

Model-specific arguments. GAM/CIF methods take newdata and inference settings. polyreg extracts stored training-cohort potential CIFs.

exposure.level

For polyreg, one fitted exposure label; defaults to the reference. Values are counterfactual predictions for this level.

event

For polyreg, event1, event2, or both (the default).

Value

A data frame with .row, estimate, optional category, and optional conf.low/conf.high columns. No newdata prediction is added to polyreg.


cifmodeling documentation built on Nov. 11, 2026, 9:06 a.m.