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
twoway : more marker symbol (or special character) ?Hello I'am trying to write a reusable comand (in Stata 15) to plot a twoway scatter plot (2 continu…
Milliseconds problem with clockI am using Stata/SE 17.0 for Mac (Apple Silicon, Revision 05 Oct 2021) with a trivial example. My ra…
dividing the sampleHi experts and researchers, I use panel data and need to divide the sample into two using Stata. …
carryforward stata 17Hi everyone, I used to work with the following command: bysort id: carryforward variable, replace bu…
Spatial panel data for provincial levelHi Stata expert, Currently, I am studying Spatial Panel Data. I am currently having trouble with the…
Subscribe to:
Post Comments (Atom)
0 Response to Generating New Variable As A Function of Group-Level Differences Of Another Variable
Post a Comment