简体   繁体   中英

ARIMA series SAS vs R

I am testing SAS and R with time series.

I have this code in R

ARIMA (1,1,0) (0,1,1)

 ar1_ma12noint<-arima(qxts, order = c(1,1,0),seasonal = list(order = c(0,1, 1), period = 12),
                     include.mean = FALSE )

ar1_ma12noint

(1-pnorm(abs(ar1_ma12noint$coef)/sqrt(diag(ar1_ma12noint$var.coef))))*2

And this code in SAS,

proc arima data= serie.diff12_r  plots(unpack)=series(corr crosscorr);
identify var=pasajeros nlag=60 ;
estimate p=(1) q=(12) noint ;
run;

EDIT: SPSS shows same estimate parameter than SAS.

i have same model in both of them but

R shows this estimate parameters:

Coefficients:
     ar1    sma1
  -0.353  -0.498

se 0.082 0.068

And SAS,

 MA1,1 0.48528 0.08367 5.80 <.0001 12 
AR1,1 -0.34008 0.08666 -3.92 0.0001 1 

I am wondering why estimate is different beetween two programs. I mean the sing for seasonal ma parameter.

thanks for all!

EDIT: i think R shows moving average model with change sing.

Question is close!

Two things:

  1. Your R model is using simple & seasonal differencing, whereas your SAS model is not
  2. SAS uses conditional least squares estimation by default, whereas R uses conditional least squares to initialize ML estimates.

Specifying ML estimates and adding differencing of orders (1 12) should produce the same results:

proc arima data= serie.diff12_r  plots(unpack)=series(corr crosscorr);
    identify var=pasajeros(1 12) nlag=60 ;
    estimate p=(1) q=(12) noint method=ml;
run;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM