Here is a way to use nlmixed procedure to estimate arma(1,1) and garch(1,1) model.
data sim;
seed=123;
lu = 0;
lh = 0;
ly = 0;
do i = 1 to 500;
h = 0.3 + 0.4 * lu ** 2 + 0.5 * lh;
u = sqrt(h) * rannor(seed);
y = 1 + 0.6 * (ly - 1) + u - 0.7 * lu;
lu = u;
lh = h;
ly = y;
output;
end;
run;
proc nlmixed data = sim ;
/* error mean model */
parms ar1=0.1 ma1=0.1 mu arch0 arch1 garch1=0.1;
err=y- (mu + ar1*xlag(y-mu, 0) - ma1 * xlag(err, 0));
/* variance model */
h = arch0 + arch1*xlag(err**2,1) +
garch1*xlag(h,1) ;
loglik=-0.5*(log(2*constant('pi'))+log(h)+err**2/h);
model err ~ general (loglik) ;
estimate 'test mu=1' mu-1;
estimate 'test ar1= 0.6' ar1-0.6;
estimate 'test am1= 0.7' ma1-0.7;
estimate 'test arch0= 0.3' arch0-0.3;
estimate 'test arch1= 0.4' arch1-0.4;
estimate 'test garch1= 0.5' garch1-0.5;
run;