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.

182 CASESTOVARS<br />

consolidated into a single row in the new data file. Each time a new combination of ID<br />

values is encountered, a new row is created.<br />

• SPLIT file processing and row groups. If split file processing is in effect, the split variables<br />

are automatically used to identify row groups (they are treated as though they appeared<br />

first on the ID subcommand). Split file processing remains in effect in the new data file<br />

unless a variable that is used to split the file is named on the DROP subcommand.<br />

• New variable groups. A variable group is a group of related columns in the new data file<br />

that is created from a variable in the original data. Each variable group contains a variable<br />

for each index value or combination of index values encountered.<br />

• Candidate variables. A variable in the original data is a candidate to become a variable<br />

group in the new data file if it is not used on the SPLIT command or the ID, FIXED, or<br />

DROP subcommands and its values vary within the row group. Variables named on the<br />

SPLIT, ID, and FIXED subcommands are assumed to not vary within the row group and are<br />

simply copied into the new data file.<br />

• New variable names. The names of the variables in a new group are constructed by the procedure.<br />

It uses the rootname specified on the RENAME subcommand and the string named<br />

on the SEPARATOR subcommand.<br />

• New variable formats. With the exception of names and labels, the dictionary information<br />

for all of the new variables in a group (for example, value labels and format) is taken from<br />

the variable in the original data.<br />

• New variable order. New variables are created in the order specified by the GROUPBY<br />

subcommand.<br />

• Weighted files. The WEIGHT command does not affect the results of CASESTOVARS. If<br />

original data are weighted, the new data file will be weighted unless the variable that is<br />

used as the weight is dropped from the new data file.<br />

• Selected cases. The FILTER and USE commands do not affect the results of CASESTOVARS.<br />

It processes all cases.<br />

Limitations<br />

Example<br />

The TEMPORARY command cannot be in effect when CASESTOVARS is executed.<br />

The following is the LIST output for a data file in which repeated measurements for the same<br />

case are stored on separate rows in a single variable:<br />

insure caseid month bps bpd<br />

BCBS 1 1 160 100<br />

BCBS 2 1 120 70<br />

BCBS 2 2 130 86<br />

Prucare 1 1 160 94<br />

Prucare 1 2 200 105<br />

Prucare 1 3 180 105<br />

Prucare 2 1 135 90

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

Saved successfully!

Ooh no, something went wrong!