-1
$\begingroup$

favorite In labour economics, the return to education denotes the response of the wage of an individual to an increase in individual’s education. It is estimated with a linear regression model:

$w_i= B_0 + B_1e_i +\epsilon_i$

where $w_i$ is the individual i’s wage (in dollars), $e_i$ is the individual i’s amount of years in education (in years), and $\epsilon_i$ is the noise. Let us assume the coefficient $B_0$ is estimated to be 13000 and the coefficient $B_1$ is estimated to be 1500.

What is $\epsilon_i$?

$\endgroup$
3
  • 1
    $\begingroup$ Didn't you already define it as the noise? It's unclear what exactly you're looking for. $\endgroup$ Aug 6, 2016 at 15:11
  • $\begingroup$ Are you looking for the value of $e_i$? I.e. $e_i=w_i-B_0-B_1e_i$ $\endgroup$ Aug 6, 2016 at 15:38
  • 1
    $\begingroup$ Sorry, typo in my earlier comment. I meant $\epsilon_i=w_i-B_0-B_1e_i$ $\endgroup$ Aug 6, 2016 at 18:07

1 Answer 1

0
$\begingroup$

Conceptually, $\epsilon_i$ is the difference between an individual $i$'s actual wage and your model's prediction for $i$'s wage.

For example, let's assume that in the data, individual $i$ has $e_i = 12$ years of education and a wage of $w_i = 32{,}250$. Then the model prediction for $i$'s wage (given the coefficients you listed) is $13{,}000 + 1{,}500*12 = 31{,}000$. But we observed that $i$'s actual wage is $32{,}250$. Then $\epsilon_i = 32{,}250 - 31{,}000 = 1{,}250$. This is just a concrete example of the formula in @roundsquare's comment.

The $\epsilon_i$ are illustrated with fake data in the plot below. (The R code to create the plot is just below the plot.) We fit the model $y_i = \beta_0 + \beta_1 x_i + \epsilon_i$. In the plot, the points are the data, the line is the regression fit (where the function is $y = \beta_0 + \beta_1 x$) and the red vertical lines are the $\epsilon_i$ (the difference between the regression line and the actual data), which are known as the residuals. The regression line is the particular line that minimizes $\Sigma{\epsilon_i^2}$ (the sum of the squared residuals).

enter image description here

library(ggplot2)

# Fake data
set.seed(491)
x = runif(50, 0, 100)
y = 2*x + 5 + rnorm(50,0,20)

# Combine x, y into a data frame
dat = data.frame(x,y)

# Fit regression model
m1 = lm(y ~ x, data=dat)

# Get predictions for regression model
dat$ypred = predict(m1)

ggplot(dat, aes(x,y)) + 
  geom_smooth(method="lm", se=FALSE, size=0.7) +
  geom_segment(aes(yend=ypred, xend=x), colour="red") +
  geom_point(pch=21, fill=hcl(240,100,55)) +
  theme_bw() 

In R, you can extract all of the $\epsilon_i$ from the regression model m1 above by running resid(m1) or dat$y - predict(m1).

$\endgroup$
3
  • $\begingroup$ You appear not to distinguish between the model and its estimates. By confusing the two, you have incorrectly characterized the $\epsilon_i$. In your code, try storing the values of rnorm(50,0,20) used to compute y (those are the $\epsilon_i$) and compare them to resid(m1) (which is what your plot iillustrates): they will not agree. $\endgroup$
    – whuber
    Aug 8, 2016 at 17:43
  • $\begingroup$ @whuber, I'm not sure I understand your comment. The rnorm(50,0,20) was just to create some random noise in the fake data. I could have done runif(50,-5,5) or c(1.2,-0.5,-10.2,...,0,3.2,0.72), etc. But don't the $\epsilon_i$ always represent the difference between the actual $y$ in the data and the model prediction for $y$ (which would be $\hat{y}$, but I was trying to avoid notation creep)? Or is there something else I'm missing? $\endgroup$
    – eipi10
    Aug 8, 2016 at 17:58
  • 1
    $\begingroup$ Yes: it's important to maintain a sharp distinction between the true values in the model and the values that are estimated from data. Your answer describes estimates, but the $\epsilon_i$ are intended to be true values. $\endgroup$
    – whuber
    Aug 8, 2016 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.