When dealing with string variables in Stata, blanks spaces can make it difficult to identify values. For example, if a variable contains " Arizona"
, a command that contains an if command such as ... if state="Arizona"
won’t detect this observation.
Remove blanks from string variables in Stata
Identify and remove blank space in Stata’s string variables