How can we get CovarMatrixDataMoments in LifeCycleModel46?

Dear Robert,
how can we get CovarMatrixDataMoments in LifeCycleModel46 form TargetMoments.AgeConditionalStats.earnings.Mean and TargetMoments.AgeConditionalStats.fractiontimeworked.Mean?Can you show the detailed calculation steps?

is it differencent from LifeCycleModel47?how can we understand it in LifeCycleModel47?

TargetMoments.AgeConditionalStats.earnings.Mean=AgeConditionalStats.earnings.Mean;
TargetMoments.AgeConditionalStats.fractiontimeworked.Mean=AgeConditionalStats.fractiontimeworked.Mean;
CovarMatrixDataMoments=diag([[0.001, 0.001, 0.001, 0.002, 0.002, 0.002, 0.001, 0.001, 0.001, 0.001,…
0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001,…
0.002, 0.003, 0.003, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.005,…
0.005, 0.005, 0.004, 0.004, 0.003, 0.003, 0.003, 0.002, 0.002, 0.002,…
0.002, 0.002, 0.001, 0.001, 0.001],…
[0.0053, 0.0051, 0.0049, 0.0045, 0.0039, 0.0030, 0.0021, 0.0013, 0.0007, 0.0003, …
0.0002, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, …
0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, …
0.0001, 0.0002, 0.0002, 0.0003, 0.0003, 0.0003, 0.0004, 0.0004, 0.0004, 0.0004, …
0.0005, 0.0005, 0.0005, 0.0005, 0.0005]]);

2 Likes

In Life-Cycle Models 45,46,48,49 and 50 (so all except 47) the covariance matrix of the data moments is just some numbers I made up. If you actually want to estimate a life-cycle model you obviously cannot just make up these numbers, you have to get them from the data itself. The reason I just made them up was to focus on how to use VFI Toolkit to implement the estimation, without having to get into how to do the data work.

In Life-Cycle Model 47 I calculated the both the data moments and the covariance matrix of the data moments from PSID data.

You can do the whole calculation of the data moments and the covariance matrix of the data moments without using VFI Toolkit or Matlab. I did the calculation in Matlab as I like having everything in one place. But most people prefer to do this data work in something like Stata or R, and then copy the results into Matlab or Fortran and work with the model there (most papers I have read do this).

Since this data work is effectively entirely independent of the fact this is a life-cycle model, probably the best way to learn how to get the data moments and the covariance matrix of the data moments is to find an ‘intro to GMM’ kind of guide that shows how to do these calculations for things like estimating a normal distribution, or estimating an AR(1) model.


how can we get CovarMatrixDataMoments in LifeCycleModel46 form TargetMoments.AgeConditionalStats.earnings.Mean and TargetMoments.AgeConditionalStats.fractiontimeworked.Mean?Can you show the detailed calculation steps?

You cannot get the covariance matrix for the data moments from the moments themselves. This is probably clear from what I wrote above, but just want to be sure I answer your question directly :slight_smile:

1 Like