View source: R/output-interop.R
| as_prediction_data | R Documentation |
Extract prediction data in the common long format
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"),
...
)
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). |
A data frame with .row, estimate, optional category, and optional conf.low/conf.high columns. No newdata prediction is added to polyreg.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.