Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make missing eval_time error in augment more informative #1058

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

EmilHvitfeldt
Copy link
Member

@EmilHvitfeldt EmilHvitfeldt commented Jan 22, 2024

To close #1049

Updated tests tidymodels/extratests#177

library(censored)

proportional_hazards() %>%
  fit(Surv(time, status) ~ ., data = lung) %>% 
  augment(new_data = lung)
#> Error in `augment()`:
#> ✖ The `eval_time` argument is missing, with no default.
#> ℹ `eval_time` is required to be able to calculate predictions of survival
#>   probability.

Copy link
Member

@hfrick hfrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 👾

@EmilHvitfeldt EmilHvitfeldt merged commit 7c40966 into main Jan 24, 2024
7 checks passed
@EmilHvitfeldt EmilHvitfeldt deleted the augment-message branch January 24, 2024 21:58
Copy link

github-actions bot commented Feb 8, 2024

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error message for augment.model_fit() with survival models
2 participants