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;