Hello fellow stata-users,
Does anyone know how to generate a new variable that solely ranges between 0-1 by combining two variables that themselves have these two values? That is, if one of the variables has a 1 i want the new variable to show 1 even if the other variable solely show 0. I suppose I should use the "if" command?
Please help!
/Johan
Related Posts with Generating variable with maximum value 1 by combining two
Interpretation of Negative Binomial Regression Model with Panel DataDear All, I am using Stata 14 and investigating the impact of Corporate Venture Capital Investment …
Place labels on boxplots with asyvars optionI generate a hbox with Code: clear set obs `=9 * 2 * 5' set seed 2803 gen y = rnormal() egen x1…
Crossed effects models with covariatesHi, I'm relatively new to STATA, and am struggling to understand a particular code that explains ho…
Adjusting for missing observations in a weighted standardized indexHi, I'm working with individual-level pooled cross-sectional National Health Interview Survey (NHIS…
TestCode Test Code: xtreg ff.logny02a i.phase1##i.regulated i.phase2##i.regulated c.logfixedassets i.n…
Subscribe to:
Post Comments (Atom)
0 Response to Generating variable with maximum value 1 by combining two
Post a Comment