[R] jointModel error messages
Charles Graham
chuckydgraham at gmail.com
Fri Oct 5 15:12:29 CEST 2012
I contacted the package developer and that lead to me removing events at time
0 (or subjects with only 1 longitudinal measurement). I then still had the
error message "Can't fit a Cox model with 0 failures" which I have managed
to avoid by adding 1.8*10^(-15) to all my survival times, any number greater
than this also works but nothing smaller! Any explanation of this would
help!
>From there I have been able to fit a few models but run into problems when I
try to inclue a variable called "logrna" (=log(rna)) in the fixed effects of
the lme model, it produces the error "Error in if (t1 || t2) { : missing
value where TRUE/FALSE needed." However if I include the term "exp(logrna)"
in the fixed effects, the joint model works fine, but this is not what I
want! This is where I really need help, what is happening?
Charles
Charles Graham wrote
> I am trying to use the jointModel function in the JM package to fit a
> simple joint model to longitudinal and survival data.
> I have come accross a range of errors when trying different things and
> just can't seem to get around them all.
>
> The code I use is as follows:
> fitLME = lme(cd4~trt+time, random=~time|num, data=mnuts2); summary(fitLME)
> fitSURV = coxph(Surv(fail.time, SI.code)~trt, x=TRUE, data=cov);
> summary(fitSURV)
> fitJM = jointModel(fitLME, fitSURV, timeVar="time",
> method="piecewise-PH-GH"); summary(fitJM)
>
> Both the lme and coxph functions work fine and both give the same sample
> size (though sometimes I get the unequal sample size error that I see
> others have experienced without a solution). My current error says "Can't
> fit a Cox model with 0 failures" despite the coxph function working fine.
> Previously I had an error message saying there were longitudinal
> measurements after the event (which I wouldn't have thought would be a
> problem!), I dealt with that by removing all measurements after the
> failure time.
>
> I want to know if there is somewhere I can find all the requirements (in
> terms of data structures, lme and coxph limitations etc.) for the
> jointModel function to work or someone who can help me with my errors.
>
> Charles
--
View this message in context: http://r.789695.n4.nabble.com/jointModel-error-messages-tp4644812p4645164.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list