# Distribution in finite horizon with permanent types

**URL:** https://discourse.vfitoolkit.com/t/distribution-in-finite-horizon-with-permanent-types/642
**Category:** Uncategorized
**Created:** [April 23, 2026, 12:18pm UTC](https://discourse.vfitoolkit.com/t/distribution-in-finite-horizon-with-permanent-types/642 "2026-04-23T12:18:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![aledinola](https://discourse.vfitoolkit.com/letter_avatar_proxy/v4/letter/a/3ec8ea/32.png) [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)
#### Post date: [April 23, 2026, 12:18pm UTC](https://discourse.vfitoolkit.com/t/distribution-in-finite-horizon-with-permanent-types/642/1 "2026-04-23T12:18:42Z")

</div>

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](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? ☹

---

<div class="post-metadata">

### Author: ![robertdkirkby](https://discourse.vfitoolkit.com/user_avatar/discourse.vfitoolkit.com/robertdkirkby/32/287_2.png) [@robertdkirkby](https://discourse.vfitoolkit.com/u/robertdkirkby)
#### Post date: [April 23, 2026, 8:05pm UTC](https://discourse.vfitoolkit.com/t/distribution-in-finite-horizon-with-permanent-types/642/2 "2026-04-23T20:05:31Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![aledinola](https://discourse.vfitoolkit.com/letter_avatar_proxy/v4/letter/a/3ec8ea/32.png) [@aledinola](https://discourse.vfitoolkit.com/u/aledinola)
#### Post date: [April 23, 2026, 9:46pm UTC](https://discourse.vfitoolkit.com/t/distribution-in-finite-horizon-with-permanent-types/642/3 "2026-04-23T21:46:13Z")

</div>

Thanks for your answer. Now I feel better 🙂
