Hi!
I have a dataset with two variables for test scores: scores in 2002 and scores in 2013. I want need to merge the two variables into a dummy variable so to include the test scores of the two years.
So the new variable "time" should look like:
time= 0 if test_scores_2002
time= 1 if test_scores_2013
So far I have not been able to find a command to generate the dummy variable from two continuous variables, and would appreciate any help!
thank you!
Related Posts with How to create a dummy variable from two variables
Tabulation based on multiple categorical variablesI am using Stata 17 and I’d like to produce a frequency table (tabulate one way) based on multiple v…
From monthly to yearly in %Hello! Code: * Example generated by -dataex-. For more info, type help dataex clear input float(fu…
Time series dummy variableHi all, I am trying to make a time-series line plot for employment as a dummy variable (called "lfs…
grouping dimensions with bordersI want horizontal lines separating my the levels of my first dimension. I can almost obtain this usi…
Quarter Averages to Yearly AveragesHello, Code: * Example generated by -dataex-. For more info, type help dataex clear input float(fu…
Subscribe to:
Post Comments (Atom)
0 Response to How to create a dummy variable from two variables
Post a Comment