How to estimate NAIRU in a state space model of the econometrics toolbox

9 views (last 30 days)
lovejesus on 16 Jun 2016
Answered: Hang Qian on 19 Aug 2016
I would like to estimate the a time-varying nairu from the Philipps Curve: pi_t = pi*_t + beta*(u_t - u*_t) + e_t
pi_t: inflation
pi*_t: trend inflation
u_t: observed unemployment rate
u*_t: unobserved nairu
state equations are:
pi*_t = pi*_t-1 + v_1t
u*_t = u*_t-1 + v_2t
N = 184 %# observations
m = 2 %# state equations
A = zeros(m);
A(1,1) = 1;
A(2,2) = NaN;
% Define the state-disturbance-loading matrix.
B = zeros(m);
B(1,1) = 0.001;
B(2,2) = 0.001;
% Define the measurement-sensitivity matrix.
C = zeros(N,m);
C(1,1) = 1;
C(1,2) = 1;
% Define the observation-innovation matrix.
D = zeros(N);
D(1,1) = 0.025;
params0 = -.3;
StateType = [2;2];
Mdl = ssm(A,B,C,D,'StateType',StateType);
Beta0 = [-.3];
[EstMdl1,estParams,EstParamCov,logL,Output] ...
= estimate(Mdl,yt,params0,'Predictors',Z,'Beta0',Beta0,'Display',{'params','diagnostics','full'})
filteredX = filter(EstMdl1,yt,'Predictors',Z,'Beta',estParams(end));
Z = observed unemployment series ---------------------------------------------------------------------------------------
Above the code I have created and it does not give me any reasonable results.
Does anyone have any suggestions?

Answers (1)

Hang Qian
Hang Qian on 19 Aug 2016
It seems that the constructed SSM is not exactly the same as the one described in the equations. Usually C and D is a low-dimension matrix (say, C appears to be a 1-by-2 vector in this case), it is unnecessary to stack N observations in a giant matrix.
To check whether A,B,C,D construct a desired state-space model, consider disp(Mdl) and the model will be displayed on the screen equation by equation.
Also, I would not let the software guess both initial states, which are diffuse. I would incorporate priors on where the two random-walk states should start in that state-space model.
- Hang Qian

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!