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

Wrong comparison of intervals in warn_about_new_time_points.pamm? #235

Closed
gavinsimpson opened this issue Jan 9, 2024 · 3 comments
Closed

Comments

@gavinsimpson
Copy link
Contributor

I think there's a little buglet in the code to compare intervals used in a PAMM and in newdata supplied for prediction. In warn_about_new_time_points.pamm we have:

if(!all(int_new %in% int_original)) {

In the above, the code is comparing int_new which is the result of

int_new <- unique(newdata[["interval"]])

which has extracted the unique event times tend in newdata. But it's comparing with the output from int_info(object), computed in L41

int_original <- int_info(object)

which is a data frame.

Shouldn't line 44 therefore be

if(!all(int_new %in% int_original[["interval"]])) {

to compare the interval column used in the model with the ones supplied in newdata?

@gavinsimpson
Copy link
Contributor Author

I see where this happened; it got changed in 1bf8b74

I'll pull a quick PR together.

@adibender
Copy link
Owner

adibender commented Jan 27, 2024

Thanks Gavin, will fix/merge soon.
I was thinking of removing the warning anyway. Once you estimated the baselinehazard, I don't see a reason to then not allow predictions at any time point (or use a finer/different grid compared to the grid used at estimation stage), as we can evaluate the smooth function at any time point.

@adibender
Copy link
Owner

closed in #236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants