Predictions for new cases from a Regression model
I am fitting a linear regression model in SPSS Statistics, and need predictions for additonal cases beyond the data on which the model is to be fit. That is, I want the model to be fit on the original data, but I need predictions to be saved for some additional cases, without them affecting the estimation of the regression coefficients. I know I could do this after running the regression using Transform>Compute and the regression coefficients, but is there an easier way?
Resolving the problem
If you have data where you have predictor variable values for some cases but no values for the dependent variable, simply run the regression as you normally would and save predicted values. These will be saved for all cases that have data on the predictors, even if they are missing on the dependent variable. To save predictions, in the main Linear Regression dialog box, click on the Save button and check the box labeled Unstandardized in the Predicted Values section at the upper left.
In situations where you do have the dependent for some cases that you want predicted but not used in the regression, you could use a Selection variable. For example, to obtain predictions for a set of new cases, add a new variable to the original file. Suppose we call it SEL, and give it a value of 1 for all the existing cases. Merge the new arrivals into the file, giving them a value for SEL of 0. Open the Analyze->Regression->Linear... dialog, and set up the regression model you wish to fit. Click on Save and specify any predictions, residuals, etc. which you wish to have calculated. In addition, choose SEL as the Selection variable, and click on the Rule button. Leave the drop-down list set to equal to, and edit the Value to be 1. Click Continue, then OK (or Paste).
If using SPSS command syntax, use something like this:
/SELECT= sel EQ 1
/METHOD=ENTER x1 x2 x3
/SAVE PRED RESID .