I used proc nlmixed
in SAS to calculate the beta estimates in non-linear regression model, while I'm not sure how to guess the starting values of the parameters. By using the example from SAS user's Guide, the SAS dataset follows:
data rats;
input trt $ m x @@;
if (trt='c') then do;
x1 = 1;
x2 = 0;
end;
else do;
x1 = 0;
x2 = 1;
end;
litter = _n_;
datalines;
c 13 13 c 12 12 c 9 9 c 9 9 c 8 8 c 8 8 c 13 12 c 12 11
c 10 9 c 10 9 c 9 8 c 13 11 c 5 4 c 7 5 c 10 7 c 10 7
t 12 12 t 11 11 t 10 10 t 9 9 t 11 10 t 10 9 t 10 9 t 9 8
t 9 8 t 5 4 t 9 7 t 7 4 t 10 5 t 6 3 t 10 3 t 7 0
;
Assuming I don't know the starting values and thereby set the values as one as following:
proc nlmixed data=rats;
parms t1=1 t2=1 s1=1 s2=1;
eta = x1*t1 + x2*t2 + alpha;
p = probnorm(eta);
model x ~ binomial(m,p);
random alpha ~ normal(0,x1*s1*s1+x2*s2*s2) subject=litter;
estimate 'gamma2' t2/sqrt(1+s2*s2);
predict p out=p;
run;
The results from SAS is shown as following:
And then how I can further adjust the starting value based on these results? I have read the method of the grid search and the method of reduced models. Can I just based on the above parameter estimates to adjust the starting value?
Furthermore, I also want to ask that, in some cases, I change the starting value to different number but SAS cannot give me results. It only shows specifications table (like the below pic) but no further results. Is this because my starting value doesn't make sense?
bounds s1 >= 0, s2 >= 0;
because the estimate ofs1
in your code is negative and that will affect the estimate ofgamma2
. I'd also includetechnique=nrridg
in theproc nlmixed
statement. $\endgroup$gamma2
doesn't includes1
so it is not affected by the negative estimate ofs1
. However, including thebounds
is still a good idea. $\endgroup$