Hi there!
I have household-level data with unique household_id. For each household, I have data for village_id and income, among other variables.
Is there any way I can create a new variable called village_income_mean by averaging the income amounts across a village given by village_id?
Thanks!
Related Posts with Averaging with a condition while generating a new variable
Multilevel SEMI have a question about SEM and would like to learn some solutions. Suppose I use three indicators …
Bulk reordering the name of variable conditional on it's formatI am currently cleaning survey data that contains 1000+ variables many of which need to be renamed b…
Cannot get options to work on graph twowayI'm using the following code to produce a bar chart with confidence intervals. If I drop the options…
Event study regression with multiple events for a certain firmHi Statalist forums, I am working on an event study where I am studying the cash dividend payouts o…
"Un-panelling" of a datasetHi, To tell stata you're dealing with a panel data set you use the command 'xtset'. I've saved the …
Subscribe to:
Post Comments (Atom)
0 Response to Averaging with a condition while generating a new variable
Post a Comment