Hello All, and Thanks in Advance.
I have a very large dataset for which I need to create a variable- no doubt using egen- but the process is not completely clear to me.
Cases are distributed across about 125 spatial groups and these spatial groupings in continuous variable (1-125).
I am interested in generating a variable that quantifies the mean difference in another binary subgroup variable *within spatial groups*
Example: What is the mean difference in height between subgroup A and subgroup B ----within spatial groups (1-125)
Variables: Height, Subgroup, Spatial Group
Thanks in advance for any advice, and I'm happy to provide further information and/or clarification.
Related Posts with Generating New Variable As A Function of Group-Level Differences Of Another Variable
Problem with a synth command : error "uno() invalid -- invalid numlist has too many elements"Dear all, As described in the title, I try to implement the Synthetic Control method on STATA to st…
Create local macro already with double quotataion marksDear Statalist I would like to create a local macro for an if-condition that already includes doubl…
Identify 100 biggest companies within a firmyearDear all, We are trying to generate a new dummy variable (biggest_comp_d) indicating whether a comp…
percentage of missing data for each group?Dear All, Suppose that the data set is Code: webuse grunfeld, clear set seed 1234 replace…
Generating the AVERAGE, by dropping Missing ValuesHello Everyone, I have Ten years of Data (2005 to 2015) for an X variable for 200 countries (data t…
Subscribe to:
Post Comments (Atom)
0 Response to Generating New Variable As A Function of Group-Level Differences Of Another Variable
Post a Comment