I have a variable in my dataset called fbnone, representing if respondents to a survey have no fringe benefits. It is a dummy variable where if they have no fringe benefits it is equal to 1 and if they do have fringe benefits it is equal to zero. However, I also have two other variables flextime and transitbenefits which I would like to include in fbnone. Basically, I want my new variable FBNone to be 1 if (fbnone=1, flextime=0, and transitbenefits=0). How would I go about generating this variable?
Related Posts with Generating a variable using several other variables
5*5 bivariate dependent sorting for portfolio creation Code: * Example generated by -dataex-. To install: ssc install dataex clear input str15 companies b…
Prediction interval (not confidence interval) calculations for glm w/ robust VCE model?In reference to the two threads below, did anybody ever figure out how to get prediction intervals/i…
Difficulty with margins: Wald estimate discrepency between ivreg2 and marginsHello, I am trying to estimate the Wald estimand and calculate standard errors using margins and sue…
Fixed Effects: how to report in a tableHi all, I would like to ask a question, please, about how to report a fixed effects regression in a…
Problem with Gen & string/numeric variable conversionDear forum members, I am new to Stata and having a problem that I can't seem to find a straightforw…
Subscribe to:
Post Comments (Atom)
0 Response to Generating a variable using several other variables
Post a Comment