OG-Core allows for a flexible specification of the number of lifetime income groups, J, so long as J>=2.
The issue with J=1 is that there are several np.squeeze() calls throughout the model that, when J=1, cut off the J-dimension and result in broadcasting array errors.
One solution is to use nparray.reshape((..., p.J)) after the squeeze calls. But there may be a more elegant option.
In any case, there are useful cases to allow for a representative agent -- both to reduce compute time for certain tests and in benchmarking functions in the stochastic_income branch.
cc @rickecon @john-p-ryan
OG-Core allows for a flexible specification of the number of lifetime income groups, J, so long as J>=2.
The issue with J=1 is that there are several
np.squeeze()calls throughout the model that, when J=1, cut off the J-dimension and result in broadcasting array errors.One solution is to use
nparray.reshape((..., p.J))after the squeeze calls. But there may be a more elegant option.In any case, there are useful cases to allow for a representative agent -- both to reduce compute time for certain tests and in benchmarking functions in the
stochastic_incomebranch.cc @rickecon @john-p-ryan