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.

MATRIX—END MATRIX 929<br />

CMAX(M) Column maxima. Takes a single argument. Returns a row vector with<br />

the same number of columns as the argument. Each column of the<br />

result contains the maximum value of the corresponding column of the<br />

argument.<br />

CMIN(M) Column minima. Takes a single argument. Returns a row vector with<br />

the same number of columns as the argument. Each column of the<br />

result contains the minimum value of the corresponding column of the<br />

argument.<br />

COS(M) Cosines. Takes a single argument. Returns a matrix having the same<br />

dimensions as the argument, containing the cosines of the elements of<br />

the argument. Elements of the argument matrix are assumed to be<br />

measured in radians. To convert degrees to radians, multiply by π ⁄ 180 ,<br />

which you can compute as ARTAN( 1)<br />

⁄ 45 . For example, the statement<br />

COMPUTE COSINES=COS(DEGREES*ARTAN(1)/45) returns<br />

cosines from a matrix containing elements measured in degrees.<br />

CSSQ(M) Column sums of squares. Takes a single argument. Returns a row<br />

vector with the same number of columns as the argument. Each<br />

column of the result contains the sum of the squared values of the<br />

elements in the corresponding column of the argument.<br />

CSUM(M) Column sums. Takes a single argument. Returns a row vector with the<br />

same number of columns as the argument. Each column of the result<br />

contains the sum of the elements in the corresponding column of the<br />

argument.<br />

DESIGN(M) Main-effects design matrix from the columns of a matrix. Takes a<br />

single argument. Returns a matrix having the same number of rows as<br />

the argument, and as many columns as the sum of the numbers of<br />

unique values in each column of the argument. Constant columns in the<br />

argument are skipped with a warning message. The result contains 1 in<br />

the row(s) where the value in question occurs in the argument and 0<br />

otherwise. For example, if:<br />

128<br />

138<br />

A =<br />

265<br />

338<br />

365<br />

, then: DESIGN( A)<br />

=<br />

10010010<br />

10001010<br />

01000101<br />

00101010<br />

00100101<br />

The first three columns of the result correspond to the three distinct<br />

values 1, 2, and 3 in the first column of A; the fourth through sixth<br />

columns of the result correspond to the three distinct values 2, 3, and 6<br />

in the second column of A; and the last two columns of the result correspond<br />

to the two distinct values 8 and 5 in the third column of A.

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

Saved successfully!

Ooh no, something went wrong!