02-11-2016 07:27 PM
I have a general ARIMA question.
When creating an ARIMA model, if I take first differences, I also must take first differences of my covariates, correct? What if my covariate is an indicator variable, 0 or 1? Does that variable get differenced?
02-12-2016 01:43 AM
No, you can't difference a series that is already stationary. If you look at the IACF it is slowly decreasing:
Data A; Do i=1 To 100; u=IfN(Ranuni(1) gt 0.5,1,0); Output; End; Run; ODS Graphics On; Proc Arima; Identify Var=u(1); Run; ODS Graphics Off;
02-12-2016 11:38 AM
Thank you user24feb.
So what happens to indicator variables when I difference the variable I'm forecasting? Can they no longer be used in the model? Or does it depend on the diagnostics?
02-15-2016 07:49 AM - edited 02-16-2016 10:42 AM
Sorry, I was wrong, you have to difference the dummy:
No, you can difference one series and leave another as it is. What exactly is your indicator variable, an outlier like here:
Data A (Keep=x_i x t); Retain e1 0 x1 0 x2 0 x_i_1 100; Do t=-100 To 10000; e=Rannor(0); x=(0.02+0.8*x1-0.4*e1+e); x_i=x_i_1+x; e1=e; x1=x; x_i_1=x_i; If t>0 Then Output; End; Run; Data A; Set A; dummy=IfN(t>=6000 & t<=7500,1,0); x_i_d=x_i-dummy*200; * <- something bad happens; Run; ODS Graphics On; Proc Timeseries Data=A Plot=Series; Var x_i_d x_i; Run; Proc Arima Data=A; Title "Model 1: Has dent"; Identify Var=x_i_d (1) CrossCorr=dummy (1); * 1!!!!; Estimate p=1 q=1 Input=dummy Method=ML; Run; Proc Arima Data=A; Title "Model 2: No dent"; Identify Var=x_i (1); Estimate p=1 q=1 Method=ML; Run; Title; ODS Graphics Off;