Hello!
I want to loop over loading several datasets. In each dataset, I want Stata to only keep dummy variables (without me having to manually identify their name) - in this case, these variables assume the values of 1 and 2, instead of the normal 0 and 1, but I assume that this doesn't matter. There are string variables and other numerical variables that are categorical and shares.
Something that would keep variables that assume only two different values for all observations; or variables that have a minimum of 1 and maximum of 2, would work.
Thanks in advance for your help.
Best,
Hélder
I want to loop over loading several datasets. In each dataset, I want Stata to only keep dummy variables (without me having to manually identify their name) - in this case, these variables assume the values of 1 and 2, instead of the normal 0 and 1, but I assume that this doesn't matter. There are string variables and other numerical variables that are categorical and shares.
Something that would keep variables that assume only two different values for all observations; or variables that have a minimum of 1 and maximum of 2, would work.
Thanks in advance for your help.
Best,
Hélder
Comment