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.

RMV 1441<br />

• Each median is based on 6 values, that is, the 3 nearest valid values on each side of the<br />

missing value.<br />

SMEAN Function<br />

SMEAN replaces missing values in the new variable with the variable mean.<br />

• The only specification on SMEAN is a variable or variable list in parentheses.<br />

• The SMEAN function is equivalent to the MEAN function with a span specification of ALL.<br />

Example<br />

RMV VAR1 TO VAR4=SMEAN(VARA VARB VARC VARD).<br />

• Four new variables (VAR1, VAR2, VAR3, and VAR4) are created.<br />

• VAR1 copies the values of VARA, VAR2 copies VARB, VAR3 copies VARC, and VAR4<br />

copies VARD. Any missing values in an existing variable are replaced with the mean of<br />

that variable.<br />

TREND Function<br />

TREND replaces missing values in the new variable with the linear trend for that point. The<br />

existing variable is regressed on an index variable scaled 1 to n. Missing values are replaced<br />

with their predicted values.<br />

• The only specification on TREND is a variable or variable list in parentheses.<br />

Example<br />

RMV YHAT=TREND(VARY).<br />

• This example creates a new variable called YHAT.<br />

• YHAT has the same values as VARY but with missing values replaced by predicted values.

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

Saved successfully!

Ooh no, something went wrong!