/**********************************************************************/


   data one;
      input y @@;                                              
      y1=lag1(y);                                              
      cards;                                                   
   10.06 10.07 9.82 9.90 9.51 9.30 9.31 10.50 11.34 11.00      
   10.71 10.90 10.86 9.73 9.40 9.25 9.39 9.64 10.38 10.38      
   ;                                                           

   proc reg data=one;                                          
      model y=y1;                                              
   quit;                                                       

   proc arima data=one;                                        
      identify var=y noprint;                                  
      estimate p=1 method=cls;                                 
      estimate p=1 method=uls;                                 
      estimate p=1 method=ml;                                  
   run;                                                        

   proc autoreg data=one;                                      
      model y=/nlag=1 method=yw;                               
      model y=/nlag=1 method=yw iter;                          
      model y=/nlag=1 method=uls;                              
      model y=/nlag=1 method=ml;                               
   run;                                                        

   proc forecast data=one method=stepar ar=1 trend=1 outest=a; 
      var y;                                                   
   run;                                                        

   proc print data=a;
   run;            


/**********************************************************************/


   data one;                          
      input y @@;                     
      cards;                          
   10 13 17 15 22 19 12 24 18 10      
   ;                                  

   proc arima data=one;               
      identify var=y nlags=4 noprint; 
      estimate q=2 mu=16 ma=0.5 0.1 noest method=cls;
      forecast lead=1 printall;                      
      estimate q=2 mu=16 ma=0.5 0.1 noest method=ml; 
      forecast lead=1 printall;                      
   run;


/**********************************************************************/