Was trying to look into discretization with multiple lags, but found no file. Could you please give any draft of this function (and maybe tips of how to proceed)? Would be happy to learn any workarounds with existing clean functions, if any.
There isn’t support in VFI Toolkit (yet) for AR(p) processes.
You can find a discretization method for AR(p) with Gaussian-Mixture shocks here:
The baseline AR(1) with GM shocks in VFI Toolkit is largely a wraparound of Toda’s code, just edited to harmonize all the inputs/outputs/options with the toolkit. [The life-cycle AR(1) I developed as an extension, but the baseline comes straight from Farmer-Toda]
At some point I will add AR(p), but I don’t see many papers with it so hasn’t been a priority.
PS. If you wanted to edit a version that harmonizes on the toolkit input/output/options for inclusion in VFI Toolkit that would obviously be great. But of course you can always just use Toda’s directly and get on with your project
[Not sure what shape the outputs are, you might need to reshape them if you wanted to use them with the toolkit]