Uploaded by 齐瀚飞

assignment 2 Use the wage1 data to explore whether OLS estimator is unbiased

advertisement
Use the wage1 data to explore whether OLS estimator is unbiased.
1. Create a dataframe wage2 containing the column educ from wage1 data.
2. Create a column wage using: wage=3+2*educ+u, where u follows a normal distribution with
mean
0
and
standard
deviation
18.
After these two steps, we get a dataset wage2 of educ and wage, and we know the true value of
𝛽0 and 𝛽1 .
Now we only have the dataset wage2 without knowing the true value of 𝛽0 and 𝛽1 . We will run
OLS and see if we can correctly estimate them using OLS.
3. Run OLS and record your estimation of 𝛽̂0 and 𝛽̂1 .
4. Repeat the step 2 and 3 for 5 times. Each time you will use a different random sample data.
From these 5 estimation, do you think the OLS estimation is unbiased?
Because the error u follows a normal distribution with mean 0 and standard deviation 18,
We can get different 𝛽̂0 and 𝛽̂1 in each OLS estimation.
The value of ̂𝛽0 and 𝛽̂1 is just around the true value, the unbiased level is depends on the standard
deviation of u.
Download