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
How can I keep original number of observations in linear regressionHello, I would like to know one thing. I am running a linear regression in Stata 16. When I added an…
Running a correlation for a subset of observationsHi all, Please consider the following example: Code: clear . input str4 id byte str3 shock byte s…
What do the numbers in the box mean in the output of the estimates of SEM builderI used SEM builder to test some model. But I don't understand what the numbers in the boxes are afte…
Analysis of rotating panel design data in StataHello everyone, I have a 9-year rotating panel design in which every year, one-ninth of the sample i…
Superimposing observed and predicted Weibull survivor function graphsHi I was wondering if there is a simple way to superimpose observed and fitted Weibull survivor func…
Subscribe to:
Post Comments (Atom)
0 Response to Generating a variable using several other variables
Post a Comment