Dear all,
I am trying to do the calculations for the algorithm below (i.e. to create the syntax for this algorithm that combines items received by household individuals and receipts by household units (individuals and HH units)). Since this implies two set of receipts (one is on the individual level 'pers_id') and the other on the household level (hh_id). How should the syntax look like? should I include 'i' in the first part which corresponds to the sum? The second part relates to those receipts on the HH level. Appreciate your help! Thanks!

Expit= I11107$$ = [sum of (x + y + z ) over all individuals in the household] + Housing + childbenefits