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
And/or symbolIs there an and/or command in Stata? I would like to generate a variable (recoverev) that would equa…
How to make scatterplot for three groups across time while controlling for covariates of nuisanceHi everyone! Excuse the kind of basic question, but I am very new to Stata. I am trying to make a …
Using a string variable as xlabel for plotsDear all, I would like to plot the weekly values of my three variables (1) amount of tests performe…
Help with reclink: perform fuzzy matches of a variable within exact matches of another variableI am trying to perform a record linking in which I have two variables: 'cod' is a 6-digit code store…
How to compare two binary logistic regression models obtained from a categorical and continuous measure of the same (predictor) variable?Hello all, This is my first post on StataList (so you know I must really be stuck!) and it is regar…
Subscribe to:
Post Comments (Atom)
0 Response to Generating a variable using several other variables
Post a Comment