Cocco Gomes and Maenhaout

The code to replicate Cocco et al breaks down after value function iteration,

Operator ‘==’ is not supported for operands of type ‘struct’.

Error in LifeCycleProfiles_FHorz_Case1_PType (line 581)
if simoptions.whichstats(1)==1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in CoccoGomesMaenhout2005 (line 413)
AgeConditionalStats=LifeCycleProfiles_FHorz_Case1_PType(StationaryDist,Policy, FnsToEvaluate, Params,n_d,n_a,n_z,N_j,Names_i,d_grid,a_grid,z_grid_J, simoptions);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1 Like

Hi, are you referring to the code on Robert’s OLGReadingList on Github (see below) or something else?
If I have time later I will run the code on my computer

I suspect it should say simoptions_temp instead of simoptions, didn’t error with other models but does for CGM2005 because N_j differs by permanent type (is the only model that does). I am however away from my computer until about 28th May so cannot fix it until then I’m afraid. [Is not just that one line, would be 10 or 20 lines that need that same change.]

I’ll let you know once I get a chance to fix this.

1 Like