Stata question
ECO 480 Econometrics I
Problem Set 4
Due: Wednesday, November 11, 2015 (beginning of the class)
1
Instruction: The problem sets are designed to be difficult and very time-intensive, so plan ahead. The
problem sets consists of solving theoretical problems and analyzing real data. You may discuss the
questions with your classmates, but you are required to hand in your own independently written solutions,
do-files, and log-files. No late work will be accepted and I do NOT accept any electronic copy. All the
data necessary for the problem set is available under UBlearns.
Important: It is extremely important to write a clean well-commented program for transparency and
replication purposes. In any empirical work, you should always be able to reproduce your result from raw
data to support your claim.
What to hand in: Typed write-up answering the assigned questions and interpreting your findings, do-file,
and log-file (you MUST use Stata). For questions involving data analysis, you will NOT get any credit if
you do not provide a program code. You may NOT use Excel.
1. Dataset TUITION shows the in-state undergraduate tuition and required fees for 33 public universities
in 2008 and 2011. (10 points)
a. Plot the data with the 2008 in-state tuition (In08) on the x-axis and the 2011 tuition (In11) on the
y-axis. Does fitting a linear model seem reasonable?
b. Run the simple linear regression for the relationship described in part (a). Report the output and
state the least-squares regression line.
c. Interpret the slope coefficient.
d. Obtain the residuals and plot them versus the fitted value. Explain in one sentence what you
should look for in this plot and why.
e. Give the null and alternative hypothesis for examining the linear relationship between 2008 and
2011 in-state tuition amount.
f. In one sentence, explain the reasoning behind your null and alternative hypothesis in part (e).
g. Write down the test statistic and P-value for the hypotheses stated in part (f). State your
conclusion.
h. Construct a 95% confidence interval for the slope.
i. What percent of the variability in 2011 tuition is explained by a linear regression model using the
2008 tuition? Explain.
j. We are also interested in investigating whether there is a linear association between the in-state
and out-of-state tuition. Perform a linear regression analysis using the 2011 data and make proper
inference. The names of the out-of-state tuition variables are Out08 and Out11.
ECO 480 Econometrics I
Problem Set 4
Due: Wednesday, November 11, 2015 (beginning of the class)
2
2. Since you learned about inference, let’s revisit the problem set 2 question #3 where you are interested
in running the linear regression model of average hourly earnings on age. We will focus on making
inference in this question. (Reminder: you used CPS08 for this problem and a detailed description of
the data is given in CPS08_Description.pdf. In this exercise, you investigated the relationship
between a worker’s age and earnings. Generally, older workers have more job experience, leading to
higher productivity and earnings.)
a. Is the estimate regression slope coefficient statistically significant? That is, can you reject the null
hypothesis H0: β1 = 0 versus a two-sided alternative at the 10%, 5%, or 1% significance level?
What is the P-value associated with the coefficient’s t-statistic?
b. Construct a 95% confidence interval for the slope coefficient.
c. Repeat (a) using only the data for high school graduates.
d. Repeat (a) using the data for college graduates.
e. Write the regression for men as 𝑌𝑚,𝑖 = 𝛽𝑚,0 + 𝛽𝑚,1𝑋𝑚,𝑖 + 𝑢𝑚,𝑖 and the regression for women
as 𝑌𝑤,𝑖 = 𝛽𝑤,0 + 𝛽𝑤,1𝑋𝑤,𝑖 + 𝑢𝑤,𝑖. Let �̂�𝑚,1denote the linear regression estimator constructed
from the sample of men and �̂�𝑤,1 denote the linear regression estimator constructed from the
sample of women, and 𝑆𝐸(�̂�𝑚,1) and 𝑆𝐸(�̂�𝑤,1) denote the corresponding standard errors. Show
that the standard error of �̂�𝑚,1 − �̂�𝑤,1 is given by
𝑆𝐸(�̂�𝑚,1-�̂�𝑤,1) = √[𝑆𝐸(�̂�𝑚,1)] 2 + [𝑆𝐸(�̂�𝑤,1)]
2 .
f. Construct the 95% confidence interval for the estimated difference.
3. Since you learned about inference, let’s revisit the problem set 2 question #2 where you are interested
in estimating the relationship between years of completed education and distance to the nearest
college. (Reminder: You used COLLDIS for this problem. A detailed description of the data is given
in COLLDIS_Description.pdf. This contains data from a random sample of high school seniors
interviewed in 1980 and re-interviewed in 1986. In this exercise, you used these data to investigate
the relationship between the number of completed years of education for young adults and the
distance from each student’s high school to the nearest four-year college. Proximity to college lowers
the cost of education, so that students who live closer to a four-year college should, on average,
complete more years of higher education.)
a. Is the estimate regression slope coefficient statistically significant? That is, can you reject the null
hypothesis H0: β1 = 0 versus a two-sided alternative at the at the 10%, 5%, or 1% significance
level? What is the P-value associated with the coefficient’s t-statistic?
b. Construct a 95% confidence interval for the slope coefficient?
ECO 480 Econometrics I
Problem Set 4
Due: Wednesday, November 11, 2015 (beginning of the class)
3
c. Do you reject or do not reject the null hypothesis based on 95% confidence interval? In one
sentence, explain why you came to that conclusion.
4. In the 1980s, Tennessee conducted an experiment in which kindergarten students were randomly
assigned to “regular” and “small” classes, and given standardized tests at the end of year. (Regular
classes contained approximately 24 students and small classes contained approximately 15 students.)
Suppose that, in the population, the standardized tests have a mean score of 925 points and a standard
deviation of 75 points. Let SmallClass denote a binary variable equal to 1 if the student is assigned to
a small class and equal to 0 otherwise. A regression of TestScore on SmallClass yields:
𝑇𝑒𝑠𝑡𝑆𝑐𝑜𝑟𝑒̂ = 918.0 + 13.9 𝑆𝑚𝑎𝑙𝑙𝐶𝑙𝑎𝑠𝑠, (1.6) (2.5)
𝑅2 = 0.01 SER = 74.6
No of obs. = 3,743
a. Do small classes improve test scores? By how much? How large is the effect with respect to the standard deviation? Is the effect large?
b. Is the estimated effect of class size on test scores statistically significant? Carry out a test at the 5% level.
c. Construct a 99% confidence interval for the effect of SmallClass on test score.
d. In this sample, what percent of students were assigned to small class? (Round to the nearest percent.)
e. What is the mean test score for students in the small class? For students in the large class?
f. Another researcher uses the same data, but regresses TestScore on LargeClass, a variable that is equal to 1 if the student is assigned to a large class and equal to 0 otherwise. What are the
regression estimates from this regression?
5. We are interested in the determinants of average hourly earnings as a function of college degree. We use our 1998 CPS data on 5911 workers with either a high school or college degree who are aged 25-
34. We estimate wages as a function of whether or not the individual has a college degree and get the
following estimates:
𝑎ℎ�̂� = 11.72 + 5.09 𝑏𝑎𝑐ℎ𝑒𝑙𝑜𝑟, (0.09) (0.17)
𝑅2 = 0.13 SER = 6.43
ECO 480 Econometrics I
Problem Set 4
Due: Wednesday, November 11, 2015 (beginning of the class)
4
a. What is the t-statistic and P-value for the null hypothesis that a college degree raises wages by
$10 an hour versus an alternative that it doesn’t?
b. Suppose we want to instead have the alternative be H1: A college degree raises wages by more
than $10 an hour? What is the t-statistic and P-value?