Distribution in finite horizon with permanent types

Consider the toolkit function that calculates the agents distribution for finite horizon models with fixed types:

https://github.com/vfitoolkit/VFIToolkit-matlab/blob/master/StationaryDist/FHorz/PType/StationaryDist_Case1_FHorz_PType

I don’t understand the following comment (in the header comments of the function):

“jequaloneDist can either be same for all permanent types, or must be passed as a structure”

In my model the initial distribution at age 1 depends on permanent types and I define it in the code as an array with size [n_a,n_semiz,N_i], since the state variables are (a,semiz) and there are N_i fixed types in total. All individuals start with zero assets but the initial distribution of semiz varies across types: low skilled agents may have different distribution of semiz compared to high skilled agents, for example.

Does this mean that I have been doing things in the wrong way? :frowning:

Comment is out of date. That used to be the case, but now you have essentially three options. Pretend the model state space is just [n_a,n_z].

i) Input jequaloneDist as [n_a,n_z], this will be interpreted as applying to all N_i permanent types
ii) Input jequaloneDist as [n_a,n_z,N_i], this will be interpreted as that the last dimension indexes the N_i permanent types.
iii) Input jequaloneDist as a structure, the fieldnames should match Names_i, and each one of the fields should be a matrix of [n_a,n_z]

Note that if you have a model where the state space differs by permanent type, obviously only the third of these is usable.

Note: If N_i=prod(n_z), the code will get confused. Avoid this.

I’ve cleaned up the comment in code to reflect this.

2 Likes

Thanks for your answer. Now I feel better :slight_smile:

1 Like