Date: Thu, 23 Sep 2010 09:56:02 -0400
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: SUBSCRIBE SAS-L Ameribrit <FRP3@PITT.EDU>
Subject: NLMIXED "Observation error"
Content-type: text/plain; charset=iso-8859-1
HI Guys: I was hoping someone could help me with an issue in PROC NLMIXED.
I receive emails from listserv and tried to send this directly to dale but
I am not sure if thats the protocol for submitting issues.
Anyway I am currently trying to model survival with hazard function:
This is from a paper by carlin et al where this is the survival piece of a
joint model. I am assumng an exponential model for now so alpha0 is some
constant say bs0.
To complete the likelihood L= h(t)*S(t) I need the survival function.
This is what I get after integrating
S(t) =exp( - A /B *exp(Bt-1)
So the code I am trying in SAS is as follows:
proc nlmixed data=full1 absgconv=1E-05 qpoints=3 ;
if(last=1) then do;
h_t= exp(linpred); /*hazard*/
S_t= exp(-C*(exp(B*survtime)-1)); *exponential survival function;
f_t= h_t*S_t; *Likelihood = h(t)*S(t);
llsurv = (censored=0)*log(f_t) + (censored=1)*log(S_t);
*contribution to the likelihood;
end; else llsurv=0;
model last ~ general(llsurv);
random u1 u2 u3 ~
estimate "s11" exp(2*s11);
estimate "s33" exp(2*s33);
estimate "se" exp(se);
But the error I keep getting is:
Execution error for observation 3.
NOTE: PROCEDURE NLMIXED used (Total process time):
real time 0.40 seconds
cpu time 0.32 second
Any help from you guys would be appreciated. I know I may have left out a
lot of info so please let me know if you need further clarification.