Hi Statalist,
I am trying to create a new variable (choice) which notes whether a graduate attended (collatt) one of their first or second choice universities (dummies of which being collprf1 and collprf2).
I have generated a new variable: gen 'choice'=0
following this I need to use: replace choice =1 if collatt==collprf1 OR collatt==collprf2
however I am unsure how to incorporate this either/or dimension in to the command.
any help would be greatly appreciated.
Oliver
Related Posts with How do I incorporate 'or' in to a stata command for generating a new variable
Reshape long to wideHi all, I need advice on how to change the dataset which is in the form of table with 6 rows * 3 co…
FavarHello everyone, I want to apply FAVAR model but I could not find any source on how to implement it …
Firm fixed-effectHi, I am using firm fixed-effect in my main regressions and the results are significant. When I run …
Reference category in fixed effects regressionHi Statalist, Please consider the following example: Code: *model 1* areg score shock##c.treatmen…
i.year not controlling for first year when using xtreg/regThe xtreg command I'm using is Code: xtreg log_dep_sum c.indep_perc##i.industry_abovemed i.month,f…
Subscribe to:
Post Comments (Atom)
0 Response to How do I incorporate 'or' in to a stata command for generating a new variable
Post a Comment