Econometric homework need STATA work!!! Emergency!!

profilepym926
midterm_exam.pdf

Econometrics Midterm Exam, Due June 8th, 2015

June 1, 2015

Instructions. This midterm consists of ten questions. Each question is worth 10 points. Some of these questions will require you to use Stata.

• Name it. Write your Student ID at the start of your midterm submission. Write your Name at the end of your midterm submission.

• Type it. Use Microsoft Word, or LYX, or any other program that allows you to type mathematics. Make sure your submission is neat. I will not accept handwritten work. If you put Stata output in your submission, change the font of the Stata output to monospace (Courier).

• Submit it. Submit your exam online by midnight on June 8th.

• Do your own work. Do not talk to each other about these questions, and especially do not share answers.

• Be concise. I will deduct points if you write things that are wrong or not directly related to answering the question. To avoid this, minimize the amount you write subject to answering the question.

A parent comments: �I think that younger siblings do better than older siblings in primary school because while younger siblings are still out of school (prior to Pre-K or Kindergarten), their older siblings (who are attending school) bring sicknesses from the school into the home. The younger siblings then get sick while they are still not yet in school, building up an immunity to school sickness. Then when the younger siblings �nally attend school, they don't get sick. Older siblings don't have this advantage�they live in a clean home until they attend school, and then they get bombarded by sickness when they start going to school. Older siblings then have to stay home sick more, which hurts their school grades.�

Question 1. Propose three hypotheses suggested by the parent's comment.

Question 2. Pick one of the hypotheses that you wrote in the previous question. Propose three observational datasets, one of which is cross-sectional, one of which is panel, one of which is time series, that you could use to study that hypothesis. Make sure to describe the important variables each dataset would contain.

Question 3. Pick one of the hypotheses that you wrote in the previous question. Propose a randomized experiment that could test the hypothesis. (The experiment does not have to be realistic or ethical.)

Question 4 [Requires Stata]. Consider the descriptive question based on the parent's claim from the previous problem: �in two-child families, does the older child do better in school than the younger child?�

On the course website �data� section, there is a �le, �NHES2007_twosiblings.dta�, which is an excerpt from the National Household Education Survey of 2007 (NHES2007�another product of the NCES). This is a survey of US households with children. The unit of observation is the child. I have restricted the dataset to children with one other sibling, and for which the parent reports �typical grades� of the child. The variable descriptions in the data should be self-explanatory.

Inspect the data. Is the data cross-sectional, panel, or time-series? Explain. Once you've answered that, answer the descriptive question presented at the beginning of this question using a

formal hypothesis test for the di�erence between two means. Present your answer in the four equivalent ways we've learned: acceptance region, con�dence interval, t-statistic, and p-value. Interpret your �ndings.

Question 5 [Requires Stata]. In the hypothesis test that you conducted in the previous question, mom's age was omitted from the analysis. Could this omission bias your hypothesis test? In your explanation, be sure to state clearly the requirements for omitted variable bias (including a picture if it helps). Then propose a multivariate

1

regression model that contains a parameter which identi�es the e�ects of being the younger sibling on child grades, holding constant the e�ect of mom's age. Run your proposed regression using the provided data, put the coe�cients and standard errors in a neat table, and interpret the results. Does this alternative model provide any evidence for the parent's claim?

Question 6. Consider the following multivariate regression output explaining whether a child attends private school based on mother's and father's education, and household income. (This regression uses the same NHES2007 as the previous part of this exam.) In the NHES2007, household income is reported in 14 categories, so I include a dummy variable for each category (category 1, which is the lowest income, is omitted). The variables mom_college and dad_college are dummies for whether that parent has a college degree (2 or 4 year degrees are both treated as a 1).

. reg private mom_college dad_college i.householdincome , robust

Linear regression Number of obs = 3,428

F(15, 3412) = 33.65

Prob > F = 0.0000

R-squared = 0.0402

Root MSE = .33349

---------------------------------------------------------------------------------

| Robust

private | Coef. Std. Err. t P>|t| [95% Conf. Interval]

----------------+----------------------------------------------------------------

mom_college | .0226086 .0133853 1.69 0.091 -.0036355 .0488526

dad_college | .0307699 .0141919 2.17 0.030 .0029444 .0585954

|

householdincome |

2 | .017251 .0160739 1.07 0.283 -.0142643 .0487664

3 | .062733 .0257021 2.44 0.015 .0123399 .113126

4 | .0930607 .0282164 3.30 0.001 .037738 .1483834

5 | .0468672 .0196209 2.39 0.017 .0083974 .085337

6 | .0037826 .0098874 0.38 0.702 -.0156031 .0231684

7 | .0654431 .0221277 2.96 0.003 .0220582 .108828

8 | .0438635 .0189764 2.31 0.021 .0066573 .0810698

9 | .0810275 .0272702 2.97 0.003 .02756 .1344951

10 | .0597434 .02136 2.80 0.005 .0178638 .1016231

11 | .0915305 .0168414 5.43 0.000 .0585103 .1245507

12 | .1107406 .0171696 6.45 0.000 .0770768 .1444044

13 | .1240095 .0163086 7.60 0.000 .0920339 .1559851

14 | .1836544 .0163583 11.23 0.000 .1515813 .2157276

|

_cons | -.0049965 .0025131 -1.99 0.047 -.0099238 -.0000691

---------------------------------------------------------------------------------

.

Suppose you are an analyst working for a private school system. Your goal is to determine who is more likely to attend private school, so that the school system can target advertisements to those who would not. Do you think this is a good model for forecasting the private school attendance of individual families? Explain.

Is father's college attainment signi�cantly related to private school attendance? Write down a formal hypothesis test and present your �ndings.

Do you think the coe�cients on mom_college and dad_college are signi�cantly di�erent? Interpret the following Stata output in your answer to this part.

. test mom_college=dad_college

( 1) mom_college - dad_college = 0

F( 1, 3412) = 0.13 Prob > F = 0.7165

2

Question 7. Because this NHES2007 data contains pairs of mothers and fathers, we can compare within household di�erences in father's and mother's education. Let i index couples (mom + dad), and let mi be the mom's education, and fi be the father's education. Then mi −fi is the di�erence in education between the mom and dad within the same household. If it is positive, the mom is more educated than the dad; if it is negative, the dad is more educated than the mom.

In the population, there is an average di�erence µm−f = E[mi −fi]. Because E[mi −fi] = E[mi] − E[fi] there are two natural estimators for µm−f:

• (�two-sample estimator�) I could use m−f = ∑

i mi

# of moms −

∑ i fi

# of dads � this estimator is calculated by taking

the sample average for mothers and the sample average for fathers in my data, and then taking the di�erence. In order to calculate the standard error of this estimator I would have to worry about the fact that my sample of mothers and sample of fathers are not independent (because I sampled families, not mothers and fathers separately).

• (�paired estimator�) I could use m−f = ∑

i (mi−fi) N

. This estimator is calculated by taking within-family mother's education and subtracting o� within-family father's education, then averaging over families. Because each (mi − fi) is independent of (mj − fj) for j 6= i (random sampling occurred at the family level!), the standard variance formula applies.

Consider the hypothesis test: H0 : µm−f = 0 versus HA : µm−f 6= 0. Because there are two natural estimators for µm−f, there are two natural ways to conduct this hypothesis test. However, it turns out that the �paired estimator� is more e�cient. So that's the estimator we should use. You should read about this at http://blog.minitab.com/blog/statistics-and-quality-data-analysis/t-for-2-should-i-use-a-paired-t-or-a-2-sample-t.

The resulting paired t-test is easily calculated in Stata. The code and output are displayed below. (You might want to try this for yourself in Stata. Note that I don't have to specify the unequal option�there is only one sample here, so that option just doesn't make sense.)

Interpret the output. Do moms have signi�cantly more education than dads? How large is the di�erence? (For this, remember that you can interpret these expectations as probabilities.)

. ttest mom_college == dad_college

Paired t test

------------------------------------------------------------------------------

Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]

---------+--------------------------------------------------------------------

mom_co~e | 3,428 .4962077 .0085408 .5000586 .4794621 .5129533

dad_co~e | 3,428 .4276546 .0084512 .4948106 .4110847 .4442245

---------+--------------------------------------------------------------------

diff | 3,428 .0685531 .0090628 .5306179 .0507841 .0863221

------------------------------------------------------------------------------

mean(diff) = mean(mom_college - dad_college) t = 7.5642

Ho: mean(diff) = 0 degrees of freedom = 3427

Ha: mean(diff) < 0 Ha: mean(diff) != 0 Ha: mean(diff) > 0

Pr(T < t) = 1.0000 Pr(|T| > |t|) = 0.0000 Pr(T > t) = 0.0000

Question 8. Suppose I have an economic model that contains a parameter θ. I propose an estimator for θ using data on a variable X. Call my estimator θ̂. I am able to show that in large samples, θ̂ is uniformly distributed on the interval θ ± σX√

N .1

Suppose in a sample of size 100 I estimate σX ≈ 1 (by using the sample standard deviation for X, sX). My point estimate for θ̂ is 0.

Consider the hypothesis: H0 : θ = 0.1, versus HA : θ 6= 0.1. Construct a 90% acceptance region for this hypothesis test. Then construct a 90% con�dence interval for θ̂. Can you reject the null hypothesis at the 10% level?

1While I've never seen an estimator that is asymptotically uniformly distributed, so the situation in this problem is completely imaginary, we will talk about statistics which are not asymptotically normal. These statistics are generally asymptotically chi-square or F.

3

Question 9. This and the next question are about regression weighting. Say instead of observing individual students, we only observe schools. That is, I have a cross-sectional dataset of

school average test score and school average attendance rate. I'm happy to estimate the relationship between school average attendance rate and school average test score, but I'm concerned that these variables might be noisier for smaller schools. Some schools have very few students. (In practice we may conduct such analysis on school-grades, and then we would have cells with very few students!)

De�ne Y i to be the average test score of school i and Xi to be the average attendance rate for school i. I assume the univariate regression model holds,

E[Y i|Xi] = β0 + β1Xi and my goal is to estimate and conduct inference on β1.

Suppose the standard deviation of test scores among students in school i was σyi. This could vary across schools, of course�some schools are more homogeneous than others. If school i has Ni students, what's the standard error of Y i? Explain.

Question 10. For this question, for ease of notation, call school average test score Yi. Note that this variable was called Y i (with a bar) in the previous question�for this question I'm going to be calling it Yi (without a bar). Same thing for Xi: Xi is now notation for Xi.

Now let's assume that σyi = σy (a constant) for all schools i. Then your answer to the previous part of this question simpli�es to a constant (in i) times 1/

√ Ni.

Write the conditional expectation model above as

Yi = β0 + β1Xi + �i

Recall that the assumption Var(�i|Xi) = σ2� (a constant) is an assumption of homoskedasticity, and under this assumption OLS is e�cient. E�ciency means that β1 will be more precisely estimated.

In our case, we don't know the form of Var(�i|Xi), but we do know that Var(Yi|Ni) = σ2y/Ni. So as Ni goes up, this variance goes down.

I believe that attendance rates are probably lower in larger schools, so Cov(Xi,Ni) < 0. If this is true, then what does this suggest about Var(�i|Xi)? Assume that the variance of Yi can only depend on Xi through Ni, that is, Var(Yi|Xi,Ni) = Var(Yi|Ni) (and by the univariate regression assumptions, Ni is redundant, meaning that E[Yi|Xi,Ni] = E[Yi|Xi] = β0 + β1Xi.).2

Now imagine I weight the regression by 1 1/Ni

= Ni. So instead of running the OLS regression

Yi = β0 + β1Xi + �i

I run the weighted least squares (WLS) regression

Yi √ Ni = β0

√ Ni + β1Xi

√ Ni + �i

√ Ni

(As discussed in class, this is weighting by Ni, not by √ Ni. I was wrong in assignment 2! We will discuss this

more later in the course.) De�ne the new error to be ui = �

√ Ni. Now what is Var(ui|Xi)? Provide a proof.3

To summarize, if you were given a dataset of averages for individual schools, or stores, or countries, and you knew the number of observations underlying each of those averages, why might you try to weight your OLS regression by the number of observations behind each average?

2 Hint: You can answer this question intuitively in a single sentence (but I cannot promise full credit for such a lazy answer). A

formal way to proceed is to expand Var(�i|Xi) by rewriting Yi = β0 + β1Xi + �i, and then thinking about how Var(Yi|Xi) will behave. If you go the formal route, you will want to use the conditional variance formula

Var(Y |X) = E[Var(Y |X,N)|X] + Var(E[Y |X,N]|X)

which because of our assumptions simpli�es to

Var(Y |X) = E[Var(Y |N)|X] + Var(E[Y |X]|X)

3 Hint: For this, I expect you will have to use the formula from the previous part,

Var(Y |X) = E[Var(Y |X,N)|X] + Var(E[Y |X,N]|X)

though I think you'll have to put other things in this formula besides Y,X, and N. Even with this hint, proving this is challenging�try your best!

4