The sample data in the package uses the included covariable (reserved by the keep = parameter). My data works fine if I don't include the keep parameter but fails consistently if I use the keep parameter. Since my example works perfectly well without the keep variable, I very much doubt that there is a problem with my main data. It must be some problem with the “keep” data.
msebmt <- msprep(data = psyneu_run1, trans = tmat,
time = c(NA, "FD_time1","de_time1","death_time1"),
status = c(NA, "FD_inc", "de_inc","death_inc"),
keep=c('sex','age'),
id='n_eid' )
Error in rep(keep[, i], tbl) : invalid 'times' argument
Thanks in advance for any suggestions.
I don't Konw why. I suspect that it is a bug, but since I can't identify it, I can't be sure. I would be very grateful for anyone that can help me with this issue.