TREND Function (RMV command)

TREND replaces missing values in the new variable with the linear trend for that point. The existing variable is regressed on an index variable scaled 1 to n. Missing values are replaced with their predicted values.

  • The only specification on TREND is a variable or variable list in parentheses.

Example

RMV YHAT=TREND(VARY).
  • This example creates a new variable called YHAT.
  • YHAT has the same values as VARY but with missing values replaced by predicted values.