SMEAN Function (RMV command)
SMEAN replaces
missing values in the new variable with the variable mean.
- The only specification on
SMEANis a variable or variable list in parentheses. - The
SMEANfunction is equivalent to theMEANfunction with a span specification ofALL.
Example
RMV VAR1 TO VAR4=SMEAN(VARA VARB VARC VARD).
- Four new variables (VAR1, VAR2, VAR3, and VAR4) are created.
- VAR1 copies the values of VARA, VAR2 copies VARB, VAR3 copies VARC, and VAR4 copies VARD. Any missing values in an existing variable are replaced with the mean of that variable.