Hello everyone,
I need to import a .sav type file in Stata to work with it. Moreover, I am not interested in all the variables inside this .sav file and I'd like to import just a subset of them.
My problem is: one of the variables I am interested in has an accent in the name and when I try to import the file I get the error "invalid syntax" (r198).
This is the code I am running:
import spss var1 var2 età using "myfile.sav"
How can I solve this problem?
Alternatively I could run:
import spss using "myfile.sav"
and then keep only the variables I am interested in, but since the file is quite big and I need to loop over 20 of these files it would take ages.
Thanks in advance for your attention,
Kind regards
Federico.
I need to import a .sav type file in Stata to work with it. Moreover, I am not interested in all the variables inside this .sav file and I'd like to import just a subset of them.
My problem is: one of the variables I am interested in has an accent in the name and when I try to import the file I get the error "invalid syntax" (r198).
This is the code I am running:
import spss var1 var2 età using "myfile.sav"
How can I solve this problem?
Alternatively I could run:
import spss using "myfile.sav"
and then keep only the variables I am interested in, but since the file is quite big and I need to loop over 20 of these files it would take ages.
Thanks in advance for your attention,
Kind regards
Federico.
Comment