We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If I try to transform a competing risk data set with time-dependent covariates into ped format, the combine argument is ignored. See example below:
combine
library(pammtools) dat <- data.frame( id = factor(1:10), status = c(0L, 1L, 2L, 0L, 1L, 2L, 1L, 0L, 0L, 2L), time = seq(from = 10, to = 100, by = 10) ) tdcs <- data.frame( id = factor(c(1:10, 1:10)), var = rbinom(20, 1, 0.3), tt = c(rep(0, 10), seq(5, 23, 2)) ) ped_dat <- as_ped( data = list(dat, tdcs), formula = Surv(time, status) ~ concurrent(var, tz_var = "tt"), id = "id", combine = FALSE ) dplyr::glimpse(ped_dat)
Result:
Rows: 228 Columns: 8 $ id <fct> 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2~ $ tstart <dbl> 0, 5, 7, 9, 0, 5, 7, 9, 11, 13,~ $ tend <dbl> 5, 7, 9, 11, 5, 7, 9, 11, 13, 1~ $ interval <fct> "(0,5]", "(5,7]", "(7,9]", "(9,~ $ offset <dbl> 1.6094379, 0.6931472, 0.6931472~ $ ped_status <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0~ $ cause <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1~ $ var <int> 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0~
The text was updated successfully, but these errors were encountered:
Thx, I can confirm. There also appears to be another problem. For the 2nd cause the TDC values don't appear to be correct...
Sorry, something went wrong.
adibender
No branches or pull requests
If I try to transform a competing risk data set with time-dependent covariates into ped format, the
combine
argument is ignored. See example below:Result:
The text was updated successfully, but these errors were encountered: