Colleagues,
I am trying to model recurrent events (clinical malaria episodes) jointly with longitudinal outcome (malaria parasites density) and a terminal outcome (loss-to-follow up). For some reason I am unable to have my code run using frailtypack package. Would anyone have an idea what might be going wrong in my code pasted below? Or if anyone has suggestions for a different package which can fit these models ( or just joint models of recurrent events and longitudinal outcome)??
Here's is the code and error message that am getting:*******> joint.model <-trivPenal(Surv(start, stop, clinical_malaria) ~ cluster(studyid) ++? ? ? ? ? ? ? ? ? ?age_yrs + season + gender + pre_netfreq + terminal(ltfu),+? ? ? ? ? ? ? ? ? ?formula.terminalEvent = ~ age_yrs + season,+? ? ? ? ? ? ? ? ? ?smearquant ~ age_yrs + season, data = paper3_recurrent_episode,+? ? ? ? ? ? ? ? ? ?data.Longi = paper3_recurrent_Longi, random = c("1","stop"), id = "studyid",??+? ? ? ? ? ? ? ? ? ?link = "Random-effects", recurrentAG = TRUE, n.knots = 6, kappa=c(0.01, 2))Error in aggregate.data.frame(as.data.frame(x), ...) :?? arguments must have same length*******Thanks for your help in advance.
Christopher Chikhosi StanleyPhD student - Epidemiology & Biostatistics?University of the WitwatersrandFaculty of Health Science
Wits School of Public Health27 Saint Andrews Road, Parktown 2193
Joint modelling using frailtypack R package
1 message · Christopher Stanley