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
tvdiff vs. eventddDear forum members I have a question about staggered diff-in-diff and event studies. I managed to f…
Linking to specific posts in a Statalist threadI'm embarrassed to post this since I'm sure the answer is simple but I couldn't find it in the Stata…
Meaning of alpha in xtpoissonDear all, I am estimating a random-effects Poisson regression with Gamma distribution, using -xtpoi…
General stata resources for analyzing J or U curve shaped dataI am analyzing data from a longitudinal data on hypertension. The outcome is all-cause mortality (ye…
IV: creating an interaction termHi all, I'm using an IV and I need to include an interaction term using the instrumented endogenous…
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