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

cuminc warning when censoring and event share the same time #74

Closed
tengfei-emory opened this issue Jul 26, 2022 · 0 comments · Fixed by #78
Closed

cuminc warning when censoring and event share the same time #74

tengfei-emory opened this issue Jul 26, 2022 · 0 comments · Fixed by #78

Comments

@tengfei-emory
Copy link
Collaborator

tengfei-emory commented Jul 26, 2022

I got "Unreplaced values treated as NA as .x is not compatible." warning. This will occur when censoring and events share the same time in the data. I made this up by setting trial$ttdeath <- ceiling(trial$ttdeath) in the simulated dataset.

library(tidycmprsk)
data(trial)
trial$ttdeath <- ceiling(trial$ttdeath)
cuminc(Surv(ttdeath, death_cr) ~ 1, trial)
#> Warning: Unreplaced values treated as NA as `.x` is not compatible.
#> Please specify replacements exhaustively or supply `.default`.
#> 
#> -- cuminc() --------------------------------------------------------------------
#> * Failure type "death from cancer"
#> time   n.risk   estimate   std.error   95% CI          
#> 5.00   199      0.000      0.000       NA, NA          
#> 10.0   193      0.030      0.012       0.012, 0.061    
#> 15.0   164      0.120      0.023       0.080, 0.169    
#> 20.0   124      0.215      0.029       0.161, 0.274
#> * Failure type "death other causes"
#> time   n.risk   estimate   std.error   95% CI          
#> 5.00   199      0.005      0.005       0.000, 0.026    
#> 10.0   193      0.025      0.011       0.009, 0.054    
#> 15.0   164      0.090      0.020       0.055, 0.135    
#> 20.0   124      0.205      0.029       0.152, 0.263

Created on 2022-07-26 by the reprex package (v2.0.1)

ddsjoberg added a commit that referenced this issue Sep 12, 2022
tengfei-emory pushed a commit that referenced this issue Sep 13, 2022
* #74 avoiding warning with tied times

* Update test-cuminc.R
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

Successfully merging a pull request may close this issue.

1 participant