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
The item sign in Cronbach's Alpha resultGood morning, I met a problem when doing the Cronbach's Alpha analysis, so I really need help. In my…
Unrecognized characters in filename when importing using: "local myfiles: dir "directory" files "*.csv"Hello! I have a file named "abc+def+mm+dd+yyyy.csv" in directory "$path/survey responses". The file…
xi commend and country fixed effect with correct standard errorHello. I am super confused about the state command including the xi and country and year fixed effec…
nlcom: maximumHello together, we're doing an inverted u-shape analysis on the impact of CSR Score on the TOA of d…
combine instrumental variable model with panel data modelHello everyone, I'm conducting tests on the effects of companies' international expansion on the val…
Subscribe to:
Post Comments (Atom)
0 Response to Generating a new variable
Post a Comment