Good day! In this dataset I have, I have different indicators of innovation: (innov1, innov2, innov3, innov4). These indicators are all in dummy format of 0 or 1. I want to generate a new variable that consolidates all those 4 indicators.
The outcome I want: have a variable innovation_all where it's 1 in the case any of the four indicators are 1.
Example:
innov1 is 0,
innov2 is 0,
innov3 is 1,
innov4 is 1; therefore my innovation_all should generate a 1 for that N.
And if all innov are 0, then the outcome should be a 0 for my innovation_all.
I need help looking for the right codes as the ones I've encountered does the opposite (creating new multiple variables based on 1 variable)
Related Posts with Generating a new variable
melogit vs bayesian melogit I would be appreciated if you could help me. I have conducted a multilevel model for binary outcome…
empty rows removed when importinghello I am importing the attached txt file. The code I used is: Code: import delimited test.txt,…
Hausman test after asclogitI need to run a hausman test after running the asclogit command, but i receive the following output …
Non-inferiority sample size calculation for proportionsNow this may be a massively stupid question however... I am trying to sort out a sample size calcul…
Problem with exporting graph as postscriptIn some occasions I export graph as postscript and it is rotated to the right, and I have to edit. A…
Subscribe to:
Post Comments (Atom)
0 Response to Generating a new variable
Post a Comment