SPSS TUTORIALS FULL COURSE BASICS ANOVA REGRESSION FACTOR

# SPSS TEMPORARY Command

## Summary

In SPSS, `TEMPORARY` indicates that the commands that follow are temporary. Temporary commands will be undone (reversed) when a command is run that reads the data. Such a command also indicates that the commands that follow are not temporary anymore.

Temporary commands between TEMPORARY and a command that reads the data.

## SPSS Temporary Example

“We'd like to dichotomize customer satisfaction into "satisfied" and "not satisfied". Next, we'd like to see its relation to perceived quality. For each category of the latter, we want to see the percentage of satisfied customers.”

We'll first create and label our dichotomous variable. Next, we'll modify its format a bit but only for the requested table. By using `TEMPORARY` we don't need to undo these modifications after creating the table. The syntax below demonstrates this. It uses supermarket.sav.

## SPSS Temporary Syntax Example

*1. Dichotomize v1 into "satisfied".

compute satisfied = v1 ge 4.

*2. Apply clear labels to our new variable.

variable labels satisfied "Dichotomized version of v1".

value labels satisfied 0 "Not satisfied" 1 "Satisfied".

*3. Start temporary commands.

temporary.

*4. Temporary commands for showing percentages in table.

compute satisfied = 100 * satisfied.

formats satisfied(pct3.0).

variable labels satisfied "Percentage of satisfied customers".

*5. Creating table reads data and reverses temporary commands.

means satisfied by v5 /cells mean.

*6. Temporary commands have been undone now.

means satisfied by v5 /cells mean.

Note that the second `MEANS` command is identical to the first one. Its output is different because the temporary modifications that affect the first table have been undone by the first `MEANS` command.

Same command, different results

## Which Commands Read the Data?

In order to use `TEMPORARY` effectively, you must know which commands do or do not read the data.What reading the data means in the first place is discussed in SPSS Procedures.An easy option for finding this out is consulting the command syntax reference. Where relevant, it explicitly states whether a command reads the data. When in doubt, experienced users can probably just reason out whether a command reads the data or not.

## Which Commands are Affected by Temporary?

As a rule of thumb

• all of the transformations and dictionary modifications but
• none of the procedures

can be used with `TEMPORARY`. For a complete and more accurate overview, consult the CSR.

# Tell us what you think!

*Required field. Your comment will show up after approval from a moderator.