There are three types of second moment reported in Table 1. Two apply complex integration to the spectral density of the relevant model. One involves a forecast error variance, from an infinite lag VAR.

 

Following is a very simple routine for computing the variance of hours worked due to technology. In addition, the following simple code produces versions of Figure 1.

 

The MATLAB code is lowvariance.m

It is set to obtain results for two models, the CKM and the MLE model.

By setting the parameter, two, at the beginning of the program, you can determine whether you run the two-shock or the three-shock version of these models.

 

To obtain the one-step-ahead forecast error variance decomposition, you need to compute C*e(t), the one-step-ahead forecast error in the infinite VAR representation of the data associated with a particular model. Here, e(t) is a column vector of fundamental shocks with zero mean and unit variance, and C is a matrix. The forecast error variance in hours worked corresponds to the second element of C*e(t).

 

To compute C, you can run smallsample.m. Parameters are set in paramsnew.m. Here, par=1 corresponds to two-shock mle, par=2 corresponds to two-shock CKM, par=3 corresponds to three-shock CKM, par=6 corresponds to three-shock MLE, par=13 corresponds to the infinite Frisch elasticity case, with high labor tax shock. To make the model nonrecursive, go to line 16 in smallsample.m and make sure it is not commented out. When it is commented out, we have the recursive version of the model. Execute smallsample.m to line 49, and the C matrix is what is put out by sargentvillaverde.m. You can execute the code down line 76, to see various checks done on C.