Skip to content

Improve error message for augment.model_fit() with survival models #1049

@hfrick

Description

@hfrick

augment() should explain that it needs eval_time to be able to calculate predictions of survival probability.

library(censored)
#> Loading required package: parsnip
#> Loading required package: survival

proportional_hazards()%>%
  fit(Surv(time, status) ~ ., data = lung) %>% 
  augment(new_data = lung)
#> Error in `augment()`:
#> ! The `eval_time` argument is missing, with no default.

Created on 2024-01-16 with reprex v2.0.2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions