Hello,
I am trying to screen out survey responses that are out-of-state using zip code. My plan was to make an indicator variable:
gen out_state_zip=1 if !inlist(zipcode, zip1, zip2,....ziplast)
Since there are so many zip codes (nearly a thousand) I got an error message stating "expression too long." Is there another method I could use to flag out of state zip codes?
My backup option will be to create a separate data set with Michigan zip codes, then do a many to 1 merge with my survey data set, and exclude surveys that don't have a zip code match.
Many thanks,
Alyssa
Related Posts with screen survey responses for state zip code
Drop variables if no entry for monthly dates within a yearHello, I am new to Stata. Can you please help me with the following issue: for different companies,…
Outreg2 after a loopHi, I am using Stata 15 and I am having trouble getting estimates of a series of regressions with O…
(daily pannel data) i want to create time dummy variable for the weekHello everyone. I can not speak English very well. So I use Google Translator. I have unbalanced dai…
ZINB on pooled panelHello, I am running a ZINB on a pooled panel using the vce (cluster ID) option, yet I have been adv…
Using xtile for a subset of casesI tried to use xtile with the if statement, but received the message, "option if not allowed". Is th…
Subscribe to:
Post Comments (Atom)
0 Response to screen survey responses for state zip code
Post a Comment