Age statistics conditional on permanent types

I have a question on how to compute the average of variable over the lifecycle, given permanent types.

Suppose I’d like to compute average labor income by age j and by education e, where e denotes a permanent education type, e=0 for non-college and e=1 for college.

In the lifecycle model there are however two different permanent types: education e=0,1 and productivity \theta=0,1. So in total there are 4 possible combinations:

Names_i={'e0theta0','e0theta1','e1theta0','e1theta1'}

I can easily obtain average labor income conditional on e=0,\theta=0, for example, with
AllStats.LabInc.e0theta0.Mean

But how do I get average labor income conditional on e=0 ?
Thanks!

1 Like

Because it is just the mean, it is easy.

Just get e=0, theta=0 and e=0, theta=1 (both of which are calculated automatically). Then just take the weighted sum of these (take mass of e=0, theta=0 and e=0, theta=1, normalize them to sum to one, and use these two numbers as the weights).

Note anything more complex than the mean and this won’t work [there is an analogous trick for std dev]

2 Likes