Programming the statistical procedures from SAS

proc nlmixed

Reply
N/A
Posts: 0

proc nlmixed

I am trying to estimate a logistic growth function with a dummy variable using proc nlmixed.

The initial model is estimated with proc nl mixed and it's a logistic growth model with two random effects. The data used cover the period 1980 - 2008

The model with the dummy uses data covering the period 1980 - 2009 and the dummy enters the dataset in the following way: IF year=2009 then year2009=1; ELSE year2009=0;
The data is trade data and 2009 is a year where the trend is abruptly disrupted downwards. (see code below)

The problem is that while the model without the dummy successfully converges when entering the dummy it fails to converge. I have tried several alternatives i.e. positioning the dummy elsewhere and I have also run models with the dummy using proc nlin for all the countries seperately to get a feeling for the initial value of the dummy parameter. Nothing works though.

Any ideas?



..........................................................................................................................
proc nlmixed data=HW_dummy tech=trureg;
parms b1=0.4281 b2= 1986.35 b3=7.8122 s2u1=0.05527 c12=-0.1918 s2u2=0.05527 s2e=0.002291 b4=56;
bounds s2u1>0, s2u2>0, s2e>0, b4>0;
num=b1+u1;
ex=exp(-(year-b2-(b4*year2009))/(b3+u2));
den=num/(1+ex);
model quantity_dig2 ~ normal(num/den,s2e);
random u1 u2~ normal ([0,0], [s2u1, c12, s2u2]) subject=partner;
predict (num/den) out=loggrowth2rand_shock;
run;
Respected Advisor
Posts: 2,655

Re: proc nlmixed

This probably doesn't address any of your problems, but I am curious about your specification of the mean as num/den, with den=num/(1+ex). Some quick algebra gives the mean as 1+ex, as the num terms cancel. This would probably not converge as the functional form doesn't fit the data very well. What puzzles me is that you get convergence when the dummy is not included--I would have expected problems there as well.

I look forward to seeing how this works out, as I am looking to start using dummy variables in nlmixed myself.

Steve Denham
Ask a Question
Discussion stats
  • 1 reply
  • 80 views
  • 0 likes
  • 2 in conversation