[R] Error when running a basic joint model
Isaac Singini
iluwinga at yahoo.com
Mon May 16 17:54:41 CEST 2016
Dear All
I have the following two datasets for joint modeling the survival and longitudinal data. However when I run the joint model I get the following error. I am new to R, may someone assist
Error in `[.data.frame`(lmeObject$data, all.vars(TermsX)) : undefined columns selected
Data structure for the longitudinal analysis is:
str(cd4long)
'data.frame': 464 obs. of 6 variables:
$ id1 : int 1011555 1011555 1011555 1011555 1011558 1011558 1011558 1011558 1011568 1011568 ...
$ week : int 2 4 6 12 2 4 6 12 2 4 ...
$ cd4countwk: int 241 137 325 283 235 219 634 465 111 316 ...
$ pred : Factor w/ 2 levels "Placebo","Prednisolone": 2 2 2 2 2 2 2 2 2 2 ...
$ outcome : int 0 0 0 0 0 0 0 0 0 0 ...
$ surv4 : int 1137 1137 1137 1137 1097 1097 1097 1097 1129 1129 ..
Data structure for the survival analysis is as
'data.frame': 116 obs. of 6 variables:
$ id1 : int 1011555 1011558 1011568 1011575 1011577 1011581 1011592 1011957 1011961 1011964 ...
$ week : int 0 0 0 0 0 0 0 0 0 0 ...
$ cd4countwk: int 241 235 111 68 146 516 150 64 13 220 ...
$ outcome : int 0 0 0 0 0 0 0 0 0 0 ...
$ surv4 : int 1137 1097 1129 1099 634 1137 1100 729 731 736 ...
$ pred : int 1 1 1 0 1 1 0 1 0 0 …
Thanks
Isaac
More information about the R-help
mailing list