Hi,
I get a "too few quotes" error when I run the following and could not figure it out. My dataset has a variable named "institution" that has the school ID and I am trying to drop observations that are not listed in the school_ID macro
Thank you in advance!
Best,
Bikalpa
I get a "too few quotes" error when I run the following and could not figure it out. My dataset has a variable named "institution" that has the school ID and I am trying to drop observations that are not listed in the school_ID macro
Code:
local school_ID "500" "100" "700" "300" "744" "723" "712" "450" "720" "721" "722" gen flag = 0 foreach item of local school_ID { replace flag = 1 if institution == "`item'" } keep if flag == 1
Thank you in advance!
Best,
Bikalpa
Comment