The IMPUTE statement names the variables whose values PROC HPIMPUTE imputes. You can specify multiple IMPUTE statements.
The IMPUTE statement takes only numeric variables; character variables are reported as an error. The variables in an IMPUTE
statement must appear in an INPUT statement; if they do not appear in an INPUT statement, an error is reported.
You can specify the following options:
-
METHOD=MEAN | RANDOM | PMEDIAN
-
specifies the method of imputation. You can specify the following values:
- MEAN
-
replaces missing values with the algebraic mean of the variable. If there is no nonmissing value for the variable to be imputed,
the imputation result remains missing.
- RANDOM
-
replaces missing values with a random value that is drawn between the minimum and maximum of the variable. If there is no
nonmissing value for the variable to be imputed, the imputation result remains missing.
- PMEDIAN
-
replaces missing values with the pseudomedian of the variable. If there is no nonmissing value for the variable to be imputed,
the imputation result remains missing.
Note: If you specify the method of imputation and all the values for all the variables to be imputed are missing, PROC HPIMPUTE
exits with an error.
-
VALUE=value
-
replaces missing values with the specified value.