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
High R-square in ppmlDear Statalist community, I would like to clarify few things about using ppml on gravity data. 1. …
How to compute constant on fixed effects Quantile regressionHi, I know that xtqreg command does not show any constant, however, as i am working on a genetics t…
How to know whether the paralell trend assumption is satisfied by using the method of Borusyak, (2021) in DiD ?Hi all, I am following the method of Borusyak, (2021) by running the Code: did_imputation package. …
-merge- not finding all matchesI'm running Stata version 14.2 on Windows. My analysis includes weight data for children. My main an…
how to merge data using different key variable names?I want to merge data between variable1 in dataset1 and variable2, variable3, variable4 in dataset2 r…
Subscribe to:
Post Comments (Atom)
0 Response to How to create a dummy variable from two variables
Post a Comment