I have what seems like a simple syntax issue that I can't figure out.
I want to write a for-loop that subsets my data based on different values of a string variable.
However, I keep getting a "type mismatch" error.
Here is an example of my problem:
Any help would be much appreciated!
I want to write a for-loop that subsets my data based on different values of a string variable.
However, I keep getting a "type mismatch" error.
Here is an example of my problem:
Code:
sysuse auto, clear
foreach mk in "AMC Concord" {
keep if make = "`mk'"
}

Comment