Using a model built by the linear function, the linearscore function scores new data—that is, it estimates the value of the dependent variable in the model using data for which its value may be unknown.
Scoring uses the values of the b-coefficients in the linear regression model and the names of their corresponding independent variable columns.
The function outputs a new table containing primary index columns, the estimated value of the dependent variable, and (optionally) a residual value for each row. The residual value is the difference between the estimated and actual values of the dependent variable.
The columns in tablename are the same as the columns in the table from which the linear function built the model, except that tablename need not include the predicted or dependent variable column if scoringmethod=score.
Evaluation
- Score a table that includes the actual values of the dependent variable.
- Calculate and report the standard error of estimate for the model.
- Compare the calculated standard error of estimate with the standard error of estimate reported when the model was built.
The function calculates the standard error of estimate with the following formula, where:
| Term | Description |
|---|---|
| Actual value of dependent variable. | |
| y | Predicted value of dependent variable. |
| n | Number of observations. |
| p | Number of independent variables. |
If there is no constant term, the function substitutes n-p for n-p-1 in the formula.