I am a bit confused on the difference between the residual term and the error term and how you go about finding each of these.
Suppose we have $$\hat{y_i}=\hat{\beta_0}+\hat{\beta_1}x_1+\hat{\beta_2}x_2+\hat{\beta_3}x_3+\hat{\beta_4}x_4+\hat{u_i}$$
Would the residual $\hat{u_i}$ just be: $$\hat{u_i}=\hat{y_i}-\hat{\beta_0}-\hat{\beta_1}x_1-\hat{\beta_2}x_2-\hat{\beta_3}x_3-\hat{\beta_4}x_4$$ ?
How would you then go about finding the error term $u_i$?