Hello,

I am trying to create a loop for a large cross-sectional dataset that identifies string variables with the response options "Yes; No; or, Unknown", replaces these values with "1, 0, or, -1", and destrings them. Preferably I would like to replace the original string variable rather than generate duplicate numeric variables. Do I have to go through the entire dataset and identify each variable name to add to a local varlist or can I set a conditional statement and loop over all the variables?

Thank you,
Tom