NAWRU State-Space Model

Use this forum for posting example programs or short bits of sample code.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

NAWRU State-Space Model

Unread post by TomDoan »

This shows the construction of several different state-space models for estimating the NAWRU (Non-Accelerating Wage Rate of Unemployment) using unobserved components state-space models. Note well that, as written, this requires RATS 9.10f. (It uses some very recent additions to simplify the coding). The 2nd Edition of the State-Space/DSGE e-course covers these is (very) great detail.
ss_5_4.rpf
Model with no constraints on variances
(5.26 KiB) Downloaded 813 times
ss_5_5.rpf
Model with constraints on variances
(2.59 KiB) Downloaded 825 times
nawrumodel.src
Source file with models for ss_5_5
(2.78 KiB) Downloaded 849 times
gap44_data.xls
Data file
(23.5 KiB) Downloaded 676 times
The overall decomposition is U=N+G where U is the unemployment rate, N the NAWRU and G the unemployment gap. There are four different models tried for N:
  1. A local level model
  2. A damped "drift" model
  3. A damped trend model
  4. A local trend model
The difference between (2) and (3) is whether the trend rate shrinks to zero (2) or an non-zero value (3). G is modeled as an AR(2) with complex roots (hence "cycles").

None of the four NAWRU models is an ideal choice for a series like this. While the series has an overall upward movement, it's not a particularly strong trend. The program estimates the models with fully unconstrained variances for the components (other than non-negativity constraints). The log likelihood for the four models are almost identical even though the decompositions are dramatically different (see the graphs). In practice, this type of model can only be used with fairly tight constraints on the variances (upper bounds and possibly non-zero lower bounds). The ss_5_5.rpf program estimates the damped drift model with a constraint on the variance of the trend rate process, which produces something at least close to a reasonable decomposition (the final graph).
NAWRU Graphs.pdf
Graphs of decompositions
(356.65 KiB) Downloaded 744 times
Tips and Tricks

This has four possible trend models, each with different parameters, some even with a different number of states. These all need to be combined with the cycle model to form the overall UC model. To simplify this, each of the trend models has a separate PARMSET and a separate FUNCTION. The PARMSET has its variables and standard constraints. The function computes the state-space system matrices given that. Because of the different forms, the system matrices include A (returned by the function), Z (some models need it), F, C and SW. The PARMSET and FUNCTIONS are put into a HASH keyed to a name for the model (such as "LocalLevel").

dec hash[parmset] nparms
newtype dlmfunc function[rect](vect*,vect*,rect*,symm*)
dec hash[dlmfunc] nfunc

The NEWTYPE instruction is new and not yet documented---it allows you to define a new type as a shorthand.

The NAWRUStart function takes the chosen model for the trend and standard model for the cycle and combines them by matrix concatenation. The DLM instruction

dlm(start=NAWRUStart(model),parmset=nparms(model)+cycleparms,$
presample=ergodic,a=adlm,f=fdlm,z=zdlm,c=cdlm,sw=swdlm,$
method=bfgs,y=lur,type=smooth,iters=500) / xstates vstates

has the same structure for each value of "model"---it calls NAWRUStart for the model to construct the overall system matrices (ADLM, FDLM, ...) and "adds" the proper PARMSET to the PARMSET for the cycle model.


Last bumped by TomDoan on Thu Aug 31, 2017 11:09 am.
Post Reply