I am trying to execute a Stata foreach
loop, but I keep encountering an error that the variable does not exist even though when I look in my data editor it does exist, and I am capable of looking at it using list some_column
. This is what I am doing:
foreach x of varlist some_column1 some_column2{
list x
}
Could someone help me identify the problem?