Syntax in SPSS Flashcards
When you have multiple syntax or output sheets open, one of them will be the active one. How do you change another sheet to the active sheet?
You need to ‘designate’ the sheet by clicking on the relevant symbol at the end of the toolbar. The sheet with the dimmed symbol is the active one.
How do you make a specific data file active?
Click on it.
How do you see the syntax?
Instead of clicking OK in the main dialog, click paste. The syntax will be pasted onto a syntax sheet.
What is a syntax sheet?
Just a plain text file.
What does a syntax look like?
All syntax starts with a key word and ends with a full stop. SPSS puts its own commands in capitol letters, but syntax is not case sensitive, so you could just type in lower case.
What is ONEWAY?
ONEWAY is the syntax command for one-way ANOVA.
ONEWAY correct BY practice: what’s this mean?
The syntax is specifying that in a one way anova the ‘correct’ is our DV and the IV is practice.
What does a / mean at the start of a word?
That’s a subcommand. All subcommands start with a /.
What is another word for Means?
Descriptives
STATISTICS DESCRIPTIVES = ?
When we carry out a one way anova, this is the sub command telling it to give us the means, because we clicked on ‘descriptive’ under Options.
What’s UNIANOVA mean?
That is the procedure name, and there are various defaults that SPSS includes in the GLM syntax. We will typically ignore these defaults unless we need to modify them in some way.
To run a procedure from a syntax sheet:
For a single command, (only one full stop), have the curser anywhere within the command, (before the full stop) and click RUN.
Or select the whole command, from the first line down to and including the full stop, and click RUN. If the syntax contains more than one ‘sentence’ or command, you need to always select it all to run it all successfully. Procedures will usually only have one sentence.
What is EXECUTE?
When we carry out new versions of scores, each compute statement is a sentsence in its own right. Eg to transform the number of items correct on a reasoning task to a proportion out of 50 and called the new variable ‘pct_corr’ for ‘percent correct’, you can do that in point and click under ‘Transform/Compute’. If you pasted it you would see COMPUTE pct_corr = correct/50.
EXECUTE .
You need to include the EXECUTE to make it actually follow your new command.
How do you comment on or annotate a syntax sheet?
Start with an asterisk (shift 8 or on numeric keypad *) and finish with a full stop. The * sign is a sign to SPSS to ignore what follows and to wake up and take charge again only when it encounters a full stop. It won’t follow commands if you leave out full stops.