I added a welfare benefit to my model, and it seems to be working well. In general, adversely shocked agents sometimes need a little help to survive when they are at the end of their rope, and their modest asks are easily satisfied. In my first tests, the aggregate benefit costs less than 5% (not 2%, alas! And with other changes, no longer 25%) of the pension scheme. When they need it, the help agents need tends to range of 10% of a year’s wages.
However, while solving the GE, there is one iteration where one(?) agent makes a claim that’s 5x-10x larger than normal. I want to track them down. They question is how to do so most efficiently.
I have the receipts:
AgeConditionalStats=LifeCycleProfiles_FHorz_Case1(StationaryDist.household,Policy.household,CFnsToEvaluate,Parameters,[],n_d.household,n_a.household,n_z.household,N_j.household,d_grid.household,a_grid.household,z_grid.household,PType_Options(simoptions,Names_i,ii));
[max_benefit,max_benefit_J]=max(AgeConditionalStats.BenefitNeeded.Maximum);
So I know the total I’m looking for (max_benefit) and the age of the suspect (max_benefit_J). But what would be the cheapest and easiest way to find the index in the matrix (or the parameter values) that yielded such a large BenefitNeeded?
I’m all for giving people what they need, but if there’s a bug in my code, I want to fix it!