LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2010, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 23 Sep 2010 09:56:02 -0400
Reply-To:     FRP3@PITT.EDU
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:

h(t)=alpha(0)*exp(XB+r1*u1+r2*u2+r3*(u1+u2*t)+u3.

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)

A= alpha(0)*exp(XB+(r1+r3)*u1+r2*u2+u3) B= r3*u2

So the code I am trying in SAS is as follows:

proc nlmixed data=full1 absgconv=1E-05 qpoints=3 ;

parms /data=seperateestimates;

/*survival part*/ if(last=1) then do;

linpred=bs0+bs1*X+r1*u1+r2*u2+r3*(u1+u2*survtime)+u3; /*linear predictor*/

A=exp(bs0+bs1*X+(r1+r3)*u1+r2*u2+u3); B=r3*u2; C=A/B;

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 ~ normal([0,0,0],[exp(2*s11),0,exp(2*s22),0,0,exp(2*s33)]) subject=id;

estimate "s11" exp(2*s11); estimate "s33" exp(2*s33); estimate "se" exp(se); run;

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. thanks Francis


Back to: Top of message | Previous page | Main SAS-L page