Hey,

I have the following panel dataset;
monthly "total_income" dat of "hh_id" (households) from jan 2018 to dec 2020 ("mdate" as time variable) and I have problems calculating averages.
Btw, not all households are observed during the whole time period, like some are observed from feb 2019 to dec 2020.
They are also divided in 5 occupation classes "occupation_class" (categorical).
I want to have the following;

1.the monthly "total_income" average of all households, so what all the households earn on average during each month.
2. The same as above but separate for each "occupation_class".

I want to show these averages in tables but whatever I try I don't get good results.

I hope someone can help me