I want to create groups for propensity score matching. If I want to classify the data into different age groups, I can create a new variable with all zeroes and give the values I want to each age group using replace. But is there a way to use egen along with group to do that?
I tried egen age_1 = group(age>=17 & age<=20) but this seems to be incorrect.
Related Posts with Creating a Group Variable
Ideas on how to convert a hyphenated interval (e.g. '5-8') into its constituent integers delimited by commas (e.g. '5,6,7,8')?Hi, As my post title states, I have data with varied hyphenated intervals such as '3-6', '1-5', '10-…
Help with outputting Mixed command results to ExcelHello, I hope you could help me, I have spent days trying to figure this out. I am trying to output…
Hedge fund data set for statahow can I create a distinct variable and using that variable to entire data set, example Fund 1--200…
loop over the panel IDs to use quantile regressions xtqregHi, I am running quantile regression for panel of 260 firms for period of 15 years. The general reg…
OLS model that includes related covariates that add up to 100%Hi group, I'm running an OLS model where the dependent variable is patients' average value of HgA1c,…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a Group Variable
Post a Comment