Hey dear STATA Users,
I am meant to create a dummy variable.
That's literally a set of dummy variables that are based on a combination of "industry" and "occupation". For example, let's assume two industries (education, financial sector) and two occupations (manager, secretary). Then, you can have a four (two multiplied by two) dummy variables: (1) 1 if industry == education and occupation == manager or 0 otherwise; 1 if industry == education and occupation == secretary or 0 otherwise; and (3) and (4) similarly constructed.
But the combination of these two variables is really big.
I tried using egen job = group(occ ind), label but that takes too long.
Does anyone have any suggestions on what I should do?
Thank you!
Related Posts with Combine two variables into a dummy variable
multiple random sample from a dataI created a data with 100,000 obs with uniform distribution and also created information for educati…
R^2 for diff-in-diffI'm estimating a diff-in-diff model with: Code: xtdidregress (y) (treated) [pweight=my_weights], g…
How to reshape/convert a household data set in the wide format to long formatHi family, I have a data set that the individual household member's information is presented in the …
Assigning classifications/status of a country for all years in panel dataI have panel data of more than 100 countries and 30 years. I want to assign these countries to low, …
Stata local macros not displayingHello, I am trying to rescale weights within a single NSFG survey wave to have a mean of 1, however …
Subscribe to:
Post Comments (Atom)
0 Response to Combine two variables into a dummy variable
Post a Comment