gen intra_nafta = (ccode=="CAN" | ccode=="MEX" | ccode=="USA") & (pcode=="CAN" | pcode=="MEX" | pcode=="USA")
replace intra_nafta = 0 if year < 1994
label var intra_nafta "1 if trade bewteen nafta members"
gen imp_nafta_rest = (ccode=="CAN" | ccode=="MEX" | ccode=="USA") & (pcode!="CAN" & pcode!="MEX" & pcode!="USA")
I don't understand the difference between the two commands in bold and the usage of "!", "|" and "*".
replace intra_nafta = 0 if year < 1994
label var intra_nafta "1 if trade bewteen nafta members"
gen imp_nafta_rest = (ccode=="CAN" | ccode=="MEX" | ccode=="USA") & (pcode!="CAN" & pcode!="MEX" & pcode!="USA")
I don't understand the difference between the two commands in bold and the usage of "!", "|" and "*".
Comment