Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73618

creating a new var using egen

$
0
0
Dear Statalist members,

I need your help. I have 1068 primary sampling unit (PSU) and each unit has 12 households as secondary sampling unit (SSU). The SSU has i family members. I need to create new variables by adding each members income of the each household. How do I do that in Stata?

egen HHDINC==sum( memberINC), by (PSU & SSU) ??? The PSU number is 1-1068, however the SSU code is 1-12, repetitively. I need to egen the new var when the two conditions are met.

Viewing all articles
Browse latest Browse all 73618

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>