简体   繁体   English

ARIMA系列SAS vs R.

[英]ARIMA series SAS vs R

I am testing SAS and R with time series. 我正在测试SAS和R的时间序列。

I have this code in R 我在R中有这个代码

ARIMA (1,1,0) (0,1,1) 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, 这个代码在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. 编辑:SPSS显示与SAS相同的估计参数。

i have same model in both of them but 我有两个相同的模型但是

R shows this estimate parameters: R显示了这个估计参数:

Coefficients:
     ar1    sma1
  -0.353  -0.498

se 0.082 0.068 se 0.082 0.068

And SAS, 和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. 我的意思是唱季节性的ma参数。

thanks for all! 谢谢大家!

EDIT: i think R shows moving average model with change sing. 编辑:我认为R显示移动平均模型与变化唱歌。

Question is close! 问题很接近!

Two things: 两件事情:

  1. Your R model is using simple & seasonal differencing, whereas your SAS model is not 您的R模型使用的是简单和季节性差异,而您的SAS模型则不是
  2. SAS uses conditional least squares estimation by default, whereas R uses conditional least squares to initialize ML estimates. SAS默认使用条件最小二乘估计,而R使用条件最小二乘来初始化ML估计。

Specifying ML estimates and adding differencing of orders (1 12) should produce the same results: 指定ML估计并添加订单差异(1 12)应产生相同的结果:

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;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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