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
Xtabond2 lagged endogenous variableHi there, I am estimating the relationship between growth and inequality using dynamic panel data. …
Ranking/categorizing firms based on the value of a variable in a specific yearHi I am working with a panel data set with c300 firms from years 2008 to 2014, with several firm-le…
Poisson with Robust SE showing totally different results from Log-OLS and NBHi, This is the first time I post question here. I've read pretty much all the posts on Poisson reg…
Difference between "fracreg" and "glm family(binomial) link(logit)"Hello everyone, I would be eager to know the difference between commands for fractional logistic re…
Out of sample prediction with the RMSE - panel dataDear all, I would like to run a panel regression for a subset of the time period of my dataset and …
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