I'm trying to develop some skill using proc nlmixed. I like the procedure because you can program ideas directly that you find in papers. I found an example using negative binomial data. the example was taken from the source in the link below, so a test is to match the results. Unfortunaly, my model does not solve for the alpha parameter, even when I give it the starting value given in my solution. However, if I enter alpha as a constant the model gets solved and all the other parameters are the same as in my example. I would like to have a strategy for how to handle a case when a parameter will not converge and I don't know before hand what the answer should be. link: https://ncss-wpengine.netdna-ssl.com/wp-content/themes/ncss/pdf/Procedures/NCSS/Negative_Binomial_Regression.pdf data koch36; length Melanoma Area 8 AgeGroup $10 Population AG1 AG2 AG3 AG4 AG5 AG6 8; infile datalines dsd; input Melanoma Area AgeGroup $ Population AG1 AG2 AG3 AG4 AG5 AG6; logpop=log(Population); datalines; 61,0,<35,2880262,1,0,0,0,0,0 76,0,35-44,564535,0,1,0,0,0,0 98,0,45-54,592983,0,0,1,0,0,0 104,0,54-64,450740,0,0,0,1,0,0 63,0,65-74,270908,0,0,0,0,1,0 80,0,>74,161850,0,0,0,0,0,1 64,1,<35,1074246,1,0,0,0,0,0 75,1,35-44,220407,0,1,0,0,0,0 68,1,45-54,198119,0,0,1,0,0,0 63,1,54-64,134084,0,0,0,1,0,0 45,1,65-74,70708,0,0,0,0,1,0 27,1,>74,34233,0,0,0,0,0,1 ; run; proc nlmixed data=koch36 gconv=0; parms alpha=0.27586 intercept=0 a1=0 b1=0 b2=0 b3=0 b4=0 b5=0; y=Melanoma; t=population; mu=exp(log(t)+Intercept+a1*area+b1*(AgeGroup="35-44")+b2*(AgeGroup="45-54")+b3*(AgeGroup="54-64")+ b4*(AgeGroup="65-74")+b5*(AgeGroup=">74")); llike=lgamma(y+1/alpha)-lgamma(1/alpha)-lgamma(y+1)-log(1+alpha*mu)/alpha-y*log(1+alpha*mu)+y*log(alpha)+y*log(mu); model y ~ general(llike); run; proc nlmixed data=koch36 gconv=0; parms intercept=0 a1=0 b1=0 b2=0 b3=0 b4=0 b5=0; alpha=0.27586; y=Melanoma; t=population; mu=exp(log(t)+Intercept+a1*area+b1*(AgeGroup="35-44")+b2*(AgeGroup="45-54")+b3*(AgeGroup="54-64")+ b4*(AgeGroup="65-74")+b5*(AgeGroup=">74")); llike=lgamma(y+1/alpha)-lgamma(1/alpha)-lgamma(y+1)-log(1+alpha*mu)/alpha-y*log(1+alpha*mu)+y*log(alpha)+y*log(mu); model y ~ general(llike); run;
... View more