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.

VARSTOCASES<br />

VARSTOCASES<br />

/MAKE new variable ["label"] [FROM] varlist [/MAKE ...]<br />

[/INDEX = {new variable ["label"] }]<br />

{new variable ["label"] (make variable name) }<br />

{new variable ["label"] (n) new variable ["label"](n) ...}<br />

[/ID = new variable ["label"]]<br />

[/NULL = {DROP**}]<br />

{KEEP }<br />

[/COUNT=new variable ["label"]]<br />

[/KEEP={ALL** }] [/DROP=varlist]<br />

{varlist}<br />

**Default if the subcommand is omitted.<br />

Example<br />

VARSTOCASES /MAKE newvar FROM var1 TO var4.<br />

Overview<br />

Options<br />

A variable contains information that you want to analyze, such as a measurement or a test<br />

score. A case is an observation, such as an individual or an institution. In a simple data<br />

structure, each variable is a single column in your data. So if you are measuring test scores,<br />

for example, all test score values would appear in only one column. In a simple data structure,<br />

each case is a single row in your data. So if you were measuring scores for all students<br />

in a class, there would be a row for each student.<br />

VARSTOCASES restructures complex data structures (in which information about a<br />

variable is stored in more than one column) into a data file in which those measurements<br />

are organized into separate rows of a single column. It replaces the working data file.<br />

You can use VARSTOCASES to restructure data files in which repeated measurements of<br />

a single case were recorded in one row into a new data file in which each measurement for<br />

a case appears in a new row.<br />

Creating new variables. You can create an identification variable that identifies the row in<br />

the original data file that was used to create a group of new rows, a count variable that<br />

contains the number of new rows generated by a row in the original data, and one or more<br />

index variables that identify the original variable from which the new row was created.<br />

Variable Selection. You can use the DROP and KEEP subcommands to specify which<br />

variables from the original data file are included in the new data file.<br />

1648

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

Saved successfully!

Ooh no, something went wrong!