How to Find the Sum of Residuals
- 1). Get the predicted value for each subject in your data set. In a regular regression model, calculate these by multiplying the parameter estimate for each independent variable -- which will be in your output -- by the subject's value for that variable and adding the products, then adding the intercept term. However, most statistical software will output the predicted values.
- 2). Find the actual values for each subject on the dependent variable. These will be in your input data set.
- 3). Subtract the values in Step 2 from those in Step 1.
- 4). Decide whether you want the sum of the actual residuals, the squared residuals or the absolute value of the residuals. In the first case, add all of the values in Step 3. In the second, square those values and add the squares. In the third, take the absolute value of the values and sum those absolute values.
Source...