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
Help with collapse (sum) commandI have a dataset, which has a (country_name) variable and a count of (requests) sent from that count…
Local macro returns variable name and subscript rather than valueHi Statalist, I am trying to rename a set of variables in Stata 16.1. The new variable name I want …
FMB Newey SE errorHi, I'm trying to run the asreg dv ivs, fmb newey(int) command on my data, but i get an error messa…
ARCH effect after fitting GARCH(1,1)I am trying to messure volatility of return on stock index by using GARCH(1,1) but the ARCH-LM test …
reshape 4-levels wide format to 2X2 long formatHello, I have designed a 2✖2 within-subject design and get a 4-level repeated measure, how could I …
Subscribe to:
Post Comments (Atom)
0 Response to Combine two variables into a dummy variable
Post a Comment