/* expseries.sas */ title 'Experimental data with autocorrelated errors'; data test; infile '/home/brunner0/441s20/expseries.data.txt'; input time group y; if group=1 then g1=1; else g1=0; if group=2 then g2=1; else g2=0; proc glm; class group; model y = group; means group; proc autoreg; title2 'Durbin-Watson test and diagnostics'; model y = g1 g2 / dwprob; proc autoreg plot=none; title2 'Test higher lags'; model y = g1 g2 / nlag=6 method=ml; proc autoreg; model y = g1 g2 / nlag=1 method = ml; group: test g1=g2=0;