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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

COMPUTE<br />

COMPUTE target variable=expression<br />

For a complete discussion of functions, see “Transformation Expressions” on p. 37.<br />

Arithmetic operators:<br />

+ Addition – Subtraction<br />

* Multiplication / Division<br />

** Exponentiation<br />

Arithmetic functions:<br />

ABS(arg) Absolute value<br />

RND(arg) Round<br />

TRUNC(arg) Truncate<br />

MOD(arg) Modulus<br />

SQRT(arg) Square root<br />

EXP(arg) Exponential<br />

LG10(arg) Base 10 logarithm<br />

LN(arg) Natural logarithm<br />

LNGAMMA(arg) Logarithm of complete Gamma function<br />

ARSIN(arg) Arcsine<br />

ARTAN(arg) Arctangent<br />

SIN(arg) Sine<br />

COS(arg) Cosine<br />

Statistical functions:<br />

SUM[.n](arg list) Sum of values across argument list<br />

MEAN[.n](arg list) Mean value across argument list<br />

SD[.n](arg list) Standard deviation of values across list<br />

VAR[.n](arg list) Variance of values across list<br />

CFVAR[.n](arg list) Coefficient of variation of values across list<br />

MIN[.n](arg list) Minimum value across list<br />

MAX[.n](arg list) Maximum value across list<br />

246

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

Saved successfully!

Ooh no, something went wrong!