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 (May 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 10 May 2006 11:57:12 -0500
Reply-To:     baogong jiang <bgjiang@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         baogong jiang <bgjiang@GMAIL.COM>
Subject:      Re: fit a ZINB model using PROC NLMIXED
Comments: To: Dale McLerran <stringplayer_2@yahoo.com>
In-Reply-To:  <20060510164443.20913.qmail@web32208.mail.mud.yahoo.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Dale:

Thank you a lot. yes, it did work after I initializing the parameters to zero

baogong

On 5/10/06, Dale McLerran <stringplayer_2@yahoo.com> wrote: > > --- baogong jiang <bgjiang@GMAIL.COM> wrote: > > > Dear SAS-Lers: > > > > I am trying to fit a ZINB model in proc nlmixed: > > > > I submit the following code: > > > > * > > > > proc* *nlmixed* data=srcdata.bj_04_compliance_final_5; > > > > eta_zip = b0_zip + b1_zip * charlson + b2_zip * no_of_diag + > > > > * *b4_*zip* * mpr ; > > > > p0_zip = *1* / (*1* + exp(-eta_zip)); > > > > eta_nb = b0_nb + b1_nb * charlson + b2_nb * no_of_diag + > > > > * b4*_nb * *mpr* +b5_nb * gap; > > > > mean = exp(eta_nb); > > > > p0 = p0_*zip* *+ > > (**1*-p0_zip)*exp(-(no_of_ed+(*1*/k))*log(*1*+k*mean)); > > > > p_else = (*1*-p0_zip)* > > > > exp(lgamma(no_of_ed+(*1*/k)) - lgamma(no_of_ed+*1*) - lgamma(*1*/k) + > > > > no_of_ed*log(k*mean) - (no_of_ed+(*1*/k))*log(*1*+k*mean)); > > > > if no_of_*ed*=*0* then loglike = log(p0); > > > > else loglike = log(p_else); > > > > model no_*of*_ed ~ general(loglike); > > * > > > > run*; > > > > ** > > > > *I got a error in SAS log:* > > > > NOTE: Execution error for observation 21763. > > > > NOTE: PROCEDURE NLMIXED used (Total process time): > > > > I do not know what's wroung, Is the code wrouge or something wroung > > in the > > data. > > > > thank you > > > > baogong > > > > Baogong, > > Why all the asterisks (*) in your e-mail? It makes things a bit > difficult to read. I don't see a consistent pattern to the > asterisks which would indicate that these asterisks were inserted > by the program that you use to read and send e-mail. > > Your problem is likely due to the default initialization of > parameters in NLMIXED along with some large values for one or > more of the predictor variables. NLMIXED initializes the > parameters to 1 by default. If you have large values of some > predictors, then you could be computing eta_nb too large to be > able to compute exp(eta_nb). Try initializing your parameters > to zero using > > parms b0_zip b1_zip b2_zip b4_zip > b0_nb b1_nb b2_nb b4_nb b5_nb 0; > > HTH, > > Dale > > > --------------------------------------- > Dale McLerran > Fred Hutchinson Cancer Research Center > mailto: dmclerra@NO_SPAMfhcrc.org > Ph: (206) 667-2926 > Fax: (206) 667-5977 > --------------------------------------- > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com >

-- Baoogng Jiang Department of Agronomy Lousisana State University


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