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.

The commands:<br />

CASESTOVARS 183<br />

SPLIT FILE BY insure.<br />

CASESTOVARS<br />

/ID=caseid<br />

/INDEX=month.<br />

create a new variable group for bps and a new group for bpd. The LIST output for the new<br />

working file is as follows:<br />

insure caseid bps.1 bps.2 bps.3 bpd.1 bpd.2 bpd.3<br />

BCBS 1 160 . . 100 . .<br />

BCBS 2 120 130 . 70 86 .<br />

Prucare 1 160 200 180 94 105 105<br />

Prucare 2 135 . . 90 . .<br />

• The row groups in the original data are identified by insure and caseid.<br />

• There are four row groups—one for each combination of the values in insure and caseid.<br />

• The command creates four rows in the new data file, one for each row group.<br />

• The candidate variables from the original file are bps and bpd. They vary within the row<br />

group, so they will become variable groups in the new data file.<br />

• The command creates two new variable groups—one for bps and one for bpd.<br />

• Each variable group contains three new variables—one for each unique value of the index<br />

variable month.<br />

ID Subcommand<br />

The ID subcommand specifies variables that identify the rows from the original data that<br />

should be grouped together in the new data file.<br />

• If the ID subcommand is omitted, only SPLIT FILE variables (if any) will be used to<br />

group rows in the original data and to identify rows in the new data file.<br />

• CASESTOVARS expects the data to be sorted by SPLIT FILE variables and then by ID<br />

variables. If split file processing is in effect, the original data should be sorted on the<br />

split variables in the order given on the SPLIT FILE command, and then on the ID<br />

variables in the order in which they appear in the ID subcommand.<br />

• A variable may appear on both the SPLIT FILE command and the ID subcommand.<br />

• Variables listed on the SPLIT FILE command and on the ID subcommand are copied into<br />

the new data file with their original values and dictionary information unless they are<br />

dropped with the DROP subcommand.<br />

• Variables listed on the ID subcommand may not appear on the FIXED or INDEX<br />

subcommands.<br />

• Rows in the original data for which any ID variable has the system-missing value or is<br />

blank are not included in the new data file, and a warning message is displayed.<br />

• ID variables are not candidates to become a variable group in the new data file.

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

Saved successfully!

Ooh no, something went wrong!