Hi all,
Quick question I am tripping up on: if I use this syntax
Does this do the replacement based on the var1 AND the var2 OR the var3 statement? i.e., I want the var1 to be true for it to replace, and then I want either the var2 OR the var3 to be true to replace.
I believe that if I reordered to this, it does not work as intended. I.e., it doesn't group var2/3 together. I think it instead needs either var2==2000 and then var3==3000 AND var1<100 to be true.
Quick question I am tripping up on: if I use this syntax
Code:
replace XXX = XXX if var1 < 100 & var2 == 2000 | var3 == 3000
I believe that if I reordered to this, it does not work as intended. I.e., it doesn't group var2/3 together. I think it instead needs either var2==2000 and then var3==3000 AND var1<100 to be true.
Code:
replace XXX = XXX if var2 == 2000 | var3 == 3000 & var1 < 100
Comment