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 />

* Matrix data with procedure REGRESSION.<br />

MATRIX DATA VARIABLES=SAVINGS POP15 POP75 INCOME GROWTH<br />

/CONTENTS=MEAN SD N CORR /FORMAT=UPPER NODIAGONAL.<br />

BEGIN DATA<br />

9.6710 35.0896 2.2930 1106.7784 3.7576<br />

4.4804 9.1517 1.2908 990.8511 2.8699<br />

50 50 50 50 50<br />

-.4555 .3165 .2203 .3048<br />

-.9085 -.7562 -.0478<br />

.7870 .0253<br />

-.1295<br />

END DATA.<br />

MATRIX DATA 963<br />

REGRESSION MATRIX=IN(*) /VARIABLES=SAVINGS TO GROWTH<br />

/DEP=SAVINGS /ENTER.<br />

• MATRIX DATA is used to generate a matrix that REGRESSION can read. REGRESSION reads<br />

and writes matrices that always contain the mean, standard deviation, N, and Pearson correlation<br />

coefficients. Data in this example do not have ROWTYPE_ values, and the correlation<br />

values are from the upper triangle of the matrix without the diagonal values.<br />

• ROWTYPE_ is not specified on VARIABLES because its values are not included in the data.<br />

• Because there are no ROWTYPE_ values, CONTENTS is required to define the record types<br />

and the order of the records in the file.<br />

• By default, MATRIX DATA reads values from the lower triangle of the matrix, including the<br />

diagonal values. FORMAT is required in this example to indicate that the data are in the<br />

upper triangle and do not include diagonal values.<br />

• BEGIN DATA immediately follows the MATRIX DATA command.<br />

• The REGRESSION procedure reads the data matrix. An asterisk (*) is specified as the<br />

input file on the MATRIX subcommand because the data are in the working file. Since<br />

there is a single vector of N’s in the data, missing values are handled listwise (the default<br />

for REGRESSION).

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

Saved successfully!

Ooh no, something went wrong!