Machine Learning - Save Variable(s) - Predicted Values
Jump to navigation
Jump to search
Creates a new variable containing predicted values for each case in the data from a model (e.g., from Machine Learning - Random Forest ). Observations with missing values in the predictors are predicted as NA.
Example
A table of categorical predictions.
Technical details
Uses the predict method from R. Unlike the defaults in most R packages, this implementation assigns predicted values for observations not in the estimation sample. Categorical variables are predicted as discrete.
Code
▶ Show Code