I have a problem in stata. I am writing this code:
gen end_date4=end_date (end_date is a variable)
replace end_date4="0" if (stage!=2 & stage2!=3 & nro!=nro2) | (stage!=3 & nro!=nro2) and I have
replace end_date4="0" if (stage!=2 & stage2!=3 & nro!=nro2) | (stage!=3 & nro!=nro2) and I have
but when I tried to write the same code but in the reverse side:
gen end_date4=0
replace end_date4=end_date if (stage==2 & stage2==3 & nro==nro2) | (stage==3 & nro==nro2)
replace end_date4=end_date if (stage==2 & stage2==3 & nro==nro2) | (stage==3 & nro==nro2)
Someone can help me?
0 Response to Help with my code
Post a Comment