From 76885870ef274cec3eb8edbb454d21fe489cfe07 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Mon, 27 Jun 2022 15:19:30 +0200
Subject: [PATCH] testsuite: provide analytical steady state to unit root
 models instead of relying on initial values

---
 tests/arima/mod1.mod                | 7 +++++++
 tests/arima/mod1a.mod               | 5 +++++
 tests/arima/mod1b.mod               | 7 +++++++
 tests/arima/mod1c.mod               | 7 +++++++
 tests/arima/mod2.mod                | 7 +++++++
 tests/arima/mod2a.mod               | 7 +++++++
 tests/arima/mod2b.mod               | 7 +++++++
 tests/arima/mod2c.mod               | 6 ++++++
 tests/decision_rules/ar_qz_test.mod | 6 ++++++
 9 files changed, 59 insertions(+)

diff --git a/tests/arima/mod1.mod b/tests/arima/mod1.mod
index fa9475b032..8d63f6e9a4 100644
--- a/tests/arima/mod1.mod
+++ b/tests/arima/mod1.mod
@@ -18,6 +18,13 @@ var e_x; stderr 0.01;
 var e_y; stderr 0.01;
 end;
 
+steady_state_model;
+dx=0;
+x=0;
+dy=0;
+y=0;
+end;
+
 stoch_simul(order=1,periods=1000,irf=0,nomoments);
 
 datatomfile('data1',[]);
\ No newline at end of file
diff --git a/tests/arima/mod1a.mod b/tests/arima/mod1a.mod
index 4ba45c6265..9020522def 100644
--- a/tests/arima/mod1a.mod
+++ b/tests/arima/mod1a.mod
@@ -11,6 +11,11 @@ dx = rho_x*dx(-1)+e_x;
 dy = rho_y*dy(-1)+e_y;
 end;
 
+steady_state_model;
+dx=0;
+dy=0;
+end;
+
 estimated_params;
 rho_x,NORMAL_PDF,0.5,0.1;
 rho_y,NORMAL_PDF,-0.3,0.1;
diff --git a/tests/arima/mod1b.mod b/tests/arima/mod1b.mod
index 829263a333..ba439aa0b0 100644
--- a/tests/arima/mod1b.mod
+++ b/tests/arima/mod1b.mod
@@ -13,6 +13,13 @@ x = x(-1)+dx;
 y = y(-1)+dy;
 end;
 
+steady_state_model;
+dx=0;
+x=0;
+dy=0;
+y=0;
+end;
+
 estimated_params;
 rho_x,NORMAL_PDF,0.5,0.1;
 rho_y,NORMAL_PDF,-0.3,0.1;
diff --git a/tests/arima/mod1c.mod b/tests/arima/mod1c.mod
index 3b7e21fde4..527015edd1 100644
--- a/tests/arima/mod1c.mod
+++ b/tests/arima/mod1c.mod
@@ -13,6 +13,13 @@ x = x(-1)+dx;
 y = y(-1)+dy;
 end;
 
+steady_state_model;
+dx=0;
+x=0;
+dy=0;
+y=0;
+end;
+
 estimated_params;
 rho_x,NORMAL_PDF,0.5,0.1;
 rho_y,NORMAL_PDF,-0.3,0.1;
diff --git a/tests/arima/mod2.mod b/tests/arima/mod2.mod
index 6c0a3c77df..5e9abd03d6 100644
--- a/tests/arima/mod2.mod
+++ b/tests/arima/mod2.mod
@@ -16,6 +16,13 @@ x = x(-1)+dx;
 y = y(-1)+dy;
 end;
 
+steady_state_model;
+dx=0;
+x=0;
+dy=0;
+y=0;
+end;
+
 shocks;
 var e_x; stderr 0.01;
 var e_y; stderr 0.01;
diff --git a/tests/arima/mod2a.mod b/tests/arima/mod2a.mod
index 305f4f2bd3..18eaa2b522 100644
--- a/tests/arima/mod2a.mod
+++ b/tests/arima/mod2a.mod
@@ -16,6 +16,13 @@ x = x(-1)+dx;
 y = y(-1)+dy;
 end;
 
+steady_state_model;
+dx=0;
+x=0;
+dy=0;
+y=0;
+end;
+
 estimated_params;
 rho_x,NORMAL_PDF,0.5,0.1;
 rho_y,NORMAL_PDF,-0.3,0.1;
diff --git a/tests/arima/mod2b.mod b/tests/arima/mod2b.mod
index ffe3e5362b..432e851d1f 100644
--- a/tests/arima/mod2b.mod
+++ b/tests/arima/mod2b.mod
@@ -16,6 +16,13 @@ x = x(-1)+dx;
 y = y(-1)+dy;
 end;
 
+steady_state_model;
+dx=0;
+x=0;
+dy=0;
+y=0;
+end;
+
 estimated_params;
 rho_x,NORMAL_PDF,0.5,0.1;
 rho_y,NORMAL_PDF,-0.3,0.1;
diff --git a/tests/arima/mod2c.mod b/tests/arima/mod2c.mod
index 1769080e19..132a3887b8 100644
--- a/tests/arima/mod2c.mod
+++ b/tests/arima/mod2c.mod
@@ -15,6 +15,12 @@ dy = rho_y*dy(-1)+a2*coint_err(-1)+e_y;
 coint_err = dx-b*dy+coint_err(-1);
 end;
 
+steady_state_model;
+dx=0;
+dy=0;
+coint_err=0;
+end;
+
 estimated_params;
 rho_x,NORMAL_PDF,0.5,0.1;
 rho_y,NORMAL_PDF,-0.3,0.1;
diff --git a/tests/decision_rules/ar_qz_test.mod b/tests/decision_rules/ar_qz_test.mod
index 8df84b8f56..7c51848356 100644
--- a/tests/decision_rules/ar_qz_test.mod
+++ b/tests/decision_rules/ar_qz_test.mod
@@ -11,6 +11,12 @@ ar1=phi*ar1(-1)+e;
 junk=0.9*junk(+1);
 end;
 
+steady_state_model;
+white_noise=0;
+ar1=0;
+junk=0;
+end;
+
 shocks;
 var e = 1;
 end;
-- 
GitLab