I need help good people. I'm trying to write a syntax in SPSS which is able to read data from the 'dat' file into an output 'sav' file. The syntax should contain all variable and value labels. Can somebody help?
I use SPSS 18 (PC) so the command can differ slightly.
- Go to "File > Open > Data"
- Go to the directory where you .dat data set is supposed to be
- At the "Files of type", it should say "PASW Statistics (*.sav)". Click that drop-down menu and choose "Text (*.txt, *.dat)"
- Follow the Wizard by telling SPSS how is the .dat file structured
- At the end (Step 6), check "Yes" under the box "Would you like to paste the syntax?", then click "Finish"
Note that .dat files are usually just a grid consisted of variable names and data. They seldom come with variable and value labels. You'll have to write the syntax for that. See this for an intro: http://statlab.stat.yale.edu/help/doco/spss_basics.jsp
- Go to "File > Save As"
- Pick your directory
- Decide your file name
- Click "Paste" for the syntax.