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.

ID Subcommand<br />

VARSTOCASES 1651<br />

The ID subcommand creates a new variable that identifies the permanent case sequence<br />

number ($casenum) of the original row that was used to create the new rows. Use the ID<br />

subcommand when the original data file does not contain a variable that identifies cases.<br />

• One new variable is named on the ID subcommand. It must have a unique name.<br />

• The label for the new variable is optional and, if specified, must be delimited by<br />

apostrophes or quotation marks.<br />

• The format of the new variable is F8.0.<br />

INDEX Subcommand<br />

In the original data file, a case appears on a single row. In the new data file, that case will<br />

appear on multiple rows. The INDEX subcommand creates a new variable that sequentially<br />

identifies a group of new rows based on the original variables from which it was created.<br />

• You can choose among three types of indices—a simple numeric index, an index that lists<br />

the variables on a FROM list, or multiple numeric indices.<br />

• New variable(s) are named on the INDEX subcommand. A new variable must have a<br />

unique name.<br />

• The label for the new variable is optional and, if specified, must be delimited by<br />

apostrophes or quotation marks.<br />

Simple Numeric Index<br />

A simple numeric index numbers the rows sequentially within a new group.<br />

• The basic specification is /INDEX=ivar, where ivar is a name for the new index variable.<br />

• The new index variable starts with 1 and increments each time a FROM variable is encountered<br />

in a row in the original file. After the last FROM variable is encountered, the index<br />

restarts at 1.<br />

• Gaps in the index sequence can occur if null data are dropped.

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

Saved successfully!

Ooh no, something went wrong!