Just uploaded codes implementing Economy 4 of Borella, De Nardi & Yang (2018) - The aggregate implications of gender and marriage.
Codes: https://github.com/robertdkirkby/LifeCycleOLGReadingList/tree/main/BorellaDeNardiYang2018
One step involves putting agents onto the initial distribution as a (log) trivariate-normal distribution. There is a command in VFI Toolkit for putting multinomial distributions on a grid (i.e. grid is input, probabilities on the grid are output) to do this which has not previously been documented anywhere.
[Original paper was missing some parameters, but authors were great about sending them by email. You can find them all in the code.]
[Requires a fairly powerful gpu to run as is, but if you just want to play with it then make the grids smaller and will be fine on standard desktop gpu.]
2 Likes
Wow, that’s a realy cool paper! It’s great that the VFI toolkit can quasi-replicate papers that are at the research frontier
I ran the code based on Borella et al (2018) and got this error:
CreateFigures =
1
Unrecognized function or variable 'discretizeLifeCycleAR1_Kirkby'.
Error in BorellaDeNardiYang2018 (line 170)
[z_grid_J_men, pi_z_J_men,jequaloneDistz_men,~] = discretizeLifeCycleAR1_Kirkby(0,Params.rho_z_men,sqrt(Params.sigmasq_upsilon_men),n_z(2),N_j,kirkbyoptions_men);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 Like
It got renamed to discretizeLifeCycleAR1_KFTT(), wasn’t aware it was still in this code. Just pushed a fix. Thanks for letting me know.
Turned on vfoptions.divideandconquer=1 while I was there.
It now runs on my laptop. Not fast as using vfoptions.lowmemory=1, but if you turned that off (which requires more GPU memory than my laptop has) it is probably pretty decent.
1 Like