I am trying to generate a new variable using the "if" command based on 3 other variables
ex:
gen completetx=1 if (neo==1 & surgery==1 & adjuvant==1)
However, it seems that stata only reads the first 2 conditions, and ignores the third. Am I doing something wrong? Is it possible to have more than 2 conditions with an if command? Thanks!
Related Posts with if command with 3 conditions
How to show the unique value of a characteristic variable in panel data?I am having a panel data with the unit is firms in 65 countries around the world with the time serie…
High R-square in ppmlHi statalist, I would like to clarify few things about using ppml on gravity data. 1. I'm trying t…
Fixed effectDear all, I will please like to find out the explanation for the issue below. I have a cross secti…
Suest and r-squared?Hi, Does anybody know if there is an option to show the r-squared with suest? And if not, is there …
Converting raster format data (5 arc-minute grid cells) to country-level panel data that can be read in STATAHi all! I am working on a project where I am looking at the impact of climate/weather variables (te…
Subscribe to:
Post Comments (Atom)
0 Response to if command with 3 conditions
Post a Comment