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
Collect recode problemHi I am working with the new table and collect command in STATA 17. After I recode levels of a dimen…
Problem with parallelHello to all, I am not very strong in STATA but I wrote a program. I wanted to parallelize a loop. B…
Wald or F-testI am using GSEM with the svy option (for weights). I am running these models on two separate subsamp…
Problem with parallel: parallelize a loopHello to all, I am not very strong in STATA but I wrote a program. I wanted to parallelize a loop. B…
How can I use the marginal effects after fixed effects and random effects models?Dear Statalist, I use linear model for panel data How can I use the marginal effects after these …
Subscribe to:
Post Comments (Atom)
0 Response to Generating New Variable As A Function of Group-Level Differences Of Another Variable
Post a Comment