BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
user24feb
Barite | Level 11

Hello,

 

I simulated an ARMA 1,1 process and added a level shift. How can I get closer to the actual parameter estimates of the model if a shift is included?

 

Data A (Keep=x_int x t);
  Retain e1 0 x1 0 x_int_1 500;  
  Do t=-100 To 10000;
    e=Rannor(1);
	x=(0.02+0.8*x1-0.4*e1+e); * create ARMA 1,1;
	x_int=x_int_1+x; * integrate;
	e1=e;
	x1=x;
	x_int_1=x_int;
	If t>0 Then Output;
  End;
Run;

Data A;
  Set A;
  dummy=IfN(t>=6000 & t<=7500,1,0);
  x_int_d=x_int-dummy*200; * create shift;
Run;

ODS Graphics On;
Proc Timeseries Data=A Plot=Series;
  Var x_int_d x_int;
Run;
ODS Graphics Off;

Proc Arima Data=A;
  Title "Model 1: With shift";
  Identify Var=x_int_d (1) CrossCorr=dummy;
  Estimate p=1 q=1 Noint Input=dummy Method=ML;
Run;
Proc Arima Data=A;
  Title "Model 2: No shift";
  Identify Var=x_int (1);
  Estimate p=1 q=1 Method=ML;
Run;

 

 

Thanks&kind regards

1 ACCEPTED SOLUTION

Accepted Solutions
alexchien
Pyrite | Level 9

you have to diff the dummy too.

 

Proc Arima Data=A;
Title "Model 1: With shift";
Identify Var=x_int_d (1) CrossCorr=dummy(1);
Estimate p=1 q=1 Noint Input=dummy Method=ML;
Run;

View solution in original post

1 REPLY 1
alexchien
Pyrite | Level 9

you have to diff the dummy too.

 

Proc Arima Data=A;
Title "Model 1: With shift";
Identify Var=x_int_d (1) CrossCorr=dummy(1);
Estimate p=1 q=1 Noint Input=dummy Method=ML;
Run;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 753 views
  • 0 likes
  • 2 in conversation