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
How to assign unique ID to duplicate entries in two rows ?X Y Unique ID (this is what I want)? 11 18 1 11 37 4 11 45 5 11 18 1 11 48 6 11 50 7 11 51 8 11 54 9…
Log-gamma model for panel data (GLM with individual fixed effects)Dear all, I would like to estimate a log-gamma model for panel data, using individual fixed effects…
meta regression using STATA 16Hi to everybody.. I try again to explain my problem, hoping that somebody answer me. Not being very …
ivregress influential observationsHello to everyone, do you know any way of identifying the most influential observations after the co…
Working with survey data: using weights in svy: proportionHi, I've recently started to work more with survey data, and discovered Stata's survey functions. H…
Subscribe to:
Post Comments (Atom)
0 Response to Averaging with a condition while generating a new variable
Post a Comment