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 (August 2002, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 5 Aug 2002 15:18:47 -0700
Reply-To:   Dale McLerran <stringplayer_2@YAHOO.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Dale McLerran <stringplayer_2@YAHOO.COM>
Subject:   Re: Zero-Inflated Poisson models
Comments:   To: Silvano Cesar da Costa <silvano@uel.br>
In-Reply-To:   <C0E2F977298CD411883100A024B2F510C8CE89@uel-pdc.uel.br>
Content-Type:   text/plain; charset=us-ascii

Silvano,

After a little closer look at your code, I noticed that you pulled a little switch: you defined a variable LOGVER to contain the model log likelihood and then named variable LOGLIKE on the model statement. The variable LOGLIKE is missing for all observations, so the procedure NLMIXED could not maximize the log likelihood. If you change the statement

model y ~ general(loglike);

to

model y ~ general(logver);

then the procedure executes successfully. Note, though, that you not only parameterize the BAP effect differently between the first and second models, but you also parameterized the FOTOP main effect differently between the two models.

Dale

--- Silvano Cesar da Costa <silvano@uel.br> wrote: > Hi Dale, > > I hope that you can help me. > > The log file is below. I believe that be convergence problem. But I > don't > solve it. I define bounds to w, but it isn't work. > > Thanks a lot. > > NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA. > NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0) > Licensed to UNIVERSIDADE ESTADUAL DE LONDRINA, Site 0008661012. > NOTE: This session is executing on the WIN_98 platform. > > NOTE: SAS initialization used: > real time 18.88 seconds > > 1 Data biom57; > 2 input fotop $ bap $ y; > 3 datalines; > > NOTE: The data set WORK.BIOM57 has 270 observations and 3 variables. > NOTE: DATA statement used: > real time 2.20 seconds > 274 ; > 275 Proc nlmixed data=biom57 hess corr cov list; > 276 parms beta0=1 beta1=1 gamma0=1 gamma1=1; > 277 eta1= beta0 + beta1*fotop; * + null_2*bap; > NOTE: Character value converted to numeric for argument 2 of '*' > operation > at > line 277 column 24. > 278 w = exp(eta1)/(1+exp(eta1)); > 279 eta2=gamma0 + gamma1*bap ;*+ null_1*fotop; > NOTE: Character value converted to numeric for argument 2 of '*' > operation > at > line 279 column 25. > 280 lambda=exp(eta2); > 281 if y=0 then prob=w + (1-w)*exp(-lambda); > 282 if y=0 then logver=log(prob); > 283 else logver=log(1-w)+y*log(lambda) - lambda - > lgamma(y+1); > 284 model y ~ general(loglike); > 285 run; > > NOTE: The function f(x) seems to be decreasing without limit in > direction x > + > alfa s. You can use the BOUNDS statement to restrict the > feasible > region. > NOTE: The function f(x) seems to be decreasing without limit in > direction x > + > alfa s. You can use the BOUNDS statement to restrict the > feasible > region. > NOTE: GCONV convergence criterion satisfied. > NOTE: At least one element of the (projected) gradient is greater > than 1e-3. > NOTE: Moore-Penrose inverse is used in covariance matrix. > WARNING: The final Hessian matrix is not positive definite, and > therefore > the > estimated covariance matrix is not full rank and may be > unreliable. > The variance of some parameter estimates is zero or some > parameters > are linearly related to other parameters. > NOTE: PROCEDURE NLMIXED used: > real time 4.55 seconds > 286 > 287 %macro zip_model(lev_fotop=, lev_bap=); > 288 proc nlmixed data=biom57; > 289 eta1 = beta0 > 290 %do i=1 %to %eval(&lev_fotop-1); + > (fotop=&i)*fotop_&i > %end; > 291 %do i=1 %to %eval(&lev_bap-1); + (bap=i)*bap_&i > %end; > 292 %do i=1 %to %eval(&lev_fotop-1); > 293 %do j=1 %to %eval(&lev_bap-1); > 294 + (fotop=&i & bap=&j)*inter_&i._&j > 295 %end; > 296 %end; > 297 ; > 298 w = exp(eta1)/(1+exp(eta1)); > 299 eta2 = gamma0 > 300 %do i=1 %to %eval(&lev_bap-1); + (bap=i)*bap_&i > %end; > 301 ; > 302 lambda=exp(eta2); > 303 if y=0 then prob=w + (1-w)*exp(-lambda); > 304 if y=0 then logver=log(prob); > 305 else logver=log(1-w)+y*log(lambda) - lambda - > lgamma(y+1); > 306 model y ~ general(loglike); > 307 run; > 308 %mend; > 309 %zip_model(lev_fotop=2, lev_bap=4); > NOTE: Character value converted to numeric for argument 1 of '=' > operation > at > line 1 column 1. > NOTE: Character value converted to numeric for argument 1 of '=' > operation > at > line 5 column 10. > NOTE: Character value converted to numeric for argument 1 of '=' > operation > at > line 7 column 10. > NOTE: Character value converted to numeric for argument 1 of '=' > operation > at > line 9 column 10. > NOTE: Character value converted to numeric for argument 1 of '=' > operation > at > line 1 column 1. > NOTE: Character value converted to numeric for argument 1 of '=' > operation > at > line 1 column 1. > NOTE: Character value converted to numeric for argument 1 of '=' > operation > at > line 1 column 1. > NOTE: Character value converted to numeric for argument 1 of '=' > operation > at > line 1 column 1. > NOTE: Character value converted to numeric for argument 1 of '=' > operation > at > line 1 column 1. > NOTE: Character value converted to numeric for argument 1 of '=' > operation > at > line 1 column 1. > NOTE: Character value converted to numeric for argument 1 of '=' > operation > at > line 19 column 10. > NOTE: Character value converted to numeric for argument 1 of '=' > operation > at > line 21 column 10. > NOTE: Character value converted to numeric for argument 1 of '=' > operation > at > line 23 column 10. > > NOTE: The function f(x) seems to be decreasing without limit in > direction x > + > alfa s. You can use the BOUNDS statement to restrict the > feasible > region. > NOTE: The function f(x) seems to be decreasing without limit in > direction x > + > alfa s. You can use the BOUNDS statement to restrict the > feasible > region. > NOTE: GCONV convergence criterion satisfied. > NOTE: At least one element of the (projected) gradient is greater > than 1e-3. > NOTE: Moore-Penrose inverse is used in covariance matrix. > WARNING: The final Hessian matrix is not positive definite, and > therefore > the > estimated covariance matrix is not full rank and may be > unreliable. > The variance of some parameter estimates is zero or some > parameters > are linearly related to other parameters. > NOTE: PROCEDURE NLMIXED used: > real time 1.37 seconds

===== --------------------------------------- Dale McLerran Fred Hutchinson Cancer Research Center mailto: dmclerra@fhcrc.org Ph: (206) 667-2926 Fax: (206) 667-5977 ---------------------------------------

__________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com


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