27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example<br />

AUTORECODE 165<br />

DATA LIST / RELIGION 1-8 (A) Y 10-13.<br />

MISSING VALUES RELIGION (’ ’).<br />

BEGIN DATA<br />

CATHOLIC 2013<br />

PROTEST 3234<br />

JEWISH 5169<br />

NONE 714<br />

OTHER 2321<br />

. . .<br />

END DATA.<br />

AUTORECODE VARIABLES=RELIGION /INTO=NRELIG /PRINT /DESCENDING.<br />

MANOVA Y BY NRELIG(1,5).<br />

• Because MANOVA requires consecutive integer values for factor levels, the string variable<br />

RELIGION is recoded into a numeric variable. The five values for RELIGION are first sorted<br />

in descending order (Z to A) and are then assigned values 1, 2, 3, 4, and 5 in target variable<br />

NRELIG.<br />

• Since a blank space is specified as a user-missing value, it is assigned the value 6. In the<br />

table produced by PRINT, the value 6 is displayed as 6M for the variable NRELIG to flag<br />

it as a user-missing value.<br />

• The values of RELIGION are used as value labels for the corresponding new values in<br />

NRELIG.<br />

• Target variable NRELIG is used as a factor variable in MANOVA.<br />

VARIABLES Subcommand<br />

VARIABLES specifies the variables to be recoded. VARIABLES is required and must be<br />

specified first. The actual keyword VARIABLES is optional.<br />

• Values from the specified variables are recoded and stored in the target variables listed on<br />

INTO. Values of the original variables are unchanged.<br />

INTO Subcommand<br />

INTO provides names for the target variables that store the new values. INTO is required and<br />

must immediately follow VARIABLES.<br />

• The number of target variables named or implied on INTO must equal the number of<br />

source variables listed on VARIABLES.<br />

Example<br />

AUTORECODE VARIABLES=V1 V2 V3 /INTO=NEWV1 TO NEWV3 /PRINT.<br />

• AUTORECODE stores the recoded values of V1, V2, and V3 into target variables named<br />

NEWV1, NEWV2, and NEWV3.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!