Overview (RMV command)
RMV
produces
new variables by copying existing variables and replacing any system-
or user-missing values with estimates computed by one of several methods.
You can also use RMV
to replace
the values of existing variables. The estimated values are computed
from valid data in the existing variables.
Basic Specification
The basic
specification is one or more new variable names, an equals sign, a
function, and an equal number of existing variables. RMV
displays a list of the new variables,
the number of missing values replaced, the case numbers of the first
and last nonmissing cases, the number of valid cases, and the function
used to produce the variables.
Syntax Rules
- The existing variables (and span, if specified) must be enclosed in parentheses.
- The equals sign is required.
- You can specify more than one equation on
RMV
. - Equations are separated by slashes.
- You can specify only one function per equation.
- You can create more than one new variable per equation by specifying more than one new variable name on the left and an equal number of existing variables on the right.
Operations
- Each new variable is added to the active dataset.
- If the new variable named already exists, its values are replaced.
- If the new variable named does not already exist, it is created.
- If the same variable is named on both sides of the equation, the new variable will replace the existing variable. Valid values from the existing variable are copied into the new variable, and missing values are replaced with estimates.
- Variables are created in the order in which they are specified on
the
RMV
command. - If multiple variables are created on a single equation, the first new variable is based on the first existing variable, the second new variable is based on the second existing variable, and so forth.
-
RMV
automatically generates a variable label for each new variable describing the function and variable used to create it and the date and time of creation. - The format of a new variable depends on the function specified and on the format of the existing variable.
-
RMV
honors theTSET MISSING
setting that is currently in effect. -
RMV
does not honor theUSE
command.
Limitations
- Maximum 1 function per equation.
- There is no limit on the number of variables created by an equation.
- There is
no limit on the number of equations per
RMV
command.