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
"no paths from latent variable to observed variables" LCADear statlists, I'm trying to do an LCA for 4 different variables, they are all continues. Using St…
ttest with three/four variablesIs it possible to run a ttest to compare mean score between groups by age? Age is a categorical var…
create dummy variables for every certain range of values of another variableDear all, My problem is that I want to create dummy variables for different brackets of my wage va…
Convert non numeric values to numeric ones (destring, or encode not properly solve it)Deal all, I would like to convert some non-numeric observations in x1 (numbers not recognized as nu…
Latent class logit with lclogit: problem with choosing the number of classesHi statalist, I have run a latent class model with a discrete choice experiment data (9882 observat…
Subscribe to:
Post Comments (Atom)
0 Response to Generating New Variable As A Function of Group-Level Differences Of Another Variable
Post a Comment