predict.fit_models: Predict method for 'fit_models'

View source: R/predict.R

predict.fit_modelsR Documentation

Predict method for fit_models

Description

Predict method for fit_models

Usage

## S3 method for class 'fit_models'
predict(object, eval_time = NULL, type = c("survival", "hazard"), ...)

Arguments

object

An object of class fit_models

eval_time

(Optional) A vector of evaluation time points for generating predictions. Default is NULL, which if left as NULL, generates a sequence from 0 to 5 times the maximum observed time.

type

A character vector indicating the type of predictions to generate. Default is c("survival", "hazard").

...

Additional arguments

Value

A list of predictions for each model in the fit_models object.

Examples

models <- fit_models(
  data = easysurv::easy_bc,
  time = "recyrs",
  event = "censrec",
  predict_by = "group",
  covariates = "group"
)

predict(models)

easysurv documentation built on June 24, 2024, 9:09 a.m.