Department of Economics

Economics 120B

Homework #2

Econ作业代写 Please hand in answers on these 3 pages and staple your Stata output (.log) file to them. Include the Stata output for results…

Please hand in answers on these 3 pages and staple your Stata output (.log) file to them. Include the Stata output for results you report in questions #1 and #2.

You need Stata for this problem set. Get your Stata by following the instructions on the TritonEd page. (Choose

<Content> and Getting Stata .)

 


  1. Confidence Econ作业代写 

The file cps2012.dta contains information about wages and education for N=77,647 observations from the Current Population Survey of 2012. You can find it in on the course TritonEd site, by choosing <Content> (on the left) and looking in the Data folder.

In those data a linear regression describes the relationship between log wages (y) and years of education (x) where the intercept of the regression line is β0 and the slope is β1.

y = β0 + β1 x + ε, Cov(x,ε)=0.

a) Think of these data as a population, which has  Use Stata’s summarize and regress commands to report the parameters of that population: E(y), E(x), β0, β1, se(β1). (Be sure to the use the “robust” option of the Stata regress command.)

 

b) Imaginedrawing a random sample of n=40 observations from the population and estimating b0 and b1 for regression line

y = b0 + b1 x + e .

Don’t do it yet, just imagine.

 

Using only the information from the population (i.e., from part (a)), calculate a 95% confidence interval for the line’s slope, the random variable b1 , in that hypothetical 40 observation sample. (Hint: the std. error of b1 decreases as the sample size grows, at a rate proportional to the square root of the sample size, and you’ve already calculated the standard error for the N=77,647 case.)

 

c) Now randomly sample 40 observations from the population for which wages are reported (lnw~=.) using the Stata “bsample” command, (see the example Stata commands below). Econ作业代写

 

In Stata, generating a random sample using the “bsample” command requires first setting a “seed” value, using the command “set seed” followed by an integer of your choosing. Choose the seed to be some arbitrary large positive, odd number.

Don’t use the same seed value as any of your classmates. Identical seed values will be interpreted in the worst possible way and marks will be deducted.)

Calculate OLS estimates b0 and b1 from your 40 observation sample. (Again, be sure to the use the “robust” option of the Stata regress command.) Report your sample estimates here.

Did your estimate fall within the 95% confidence interval described in (b)? Yes/No What was the probability of that happening ex ante (i.e., before you did it)?

 

d) Now pretend that you don’t know anything about the population except for the information in your 40 observation Estimate a 95% confidence interval for β1, using only the information in your 40 observation sample. (Note: Calculate your own interval using your standard error from the 40 observations, not the one reported by Stata.)

 

Does the confidence interval you constructed include the true β1 from the population regression in (a)? Yes / No

(Please remember your answer, as I will ask about it in class.) Econ作业代写

Econ作业代写
Econ作业代写

 

e) Assumingthat your classmates all estimate b1 and calculate confidence intervals correctly, approximately what proportion of their confidence intervals will contain β1?

 


  1. Yours lope Econ作业代写

Using one of your datasets from your problem set #1, which has at least 30 observations, calculate the slope, the (robust) std. error of the slope, the intercept and the R2 statistic, using Stata.

a) Reportthem here:

 

b) Isyour slope significantly different from zero (in absolute value), using an alpha level of 5%, in a symmetric two sided test?

 

c) What proportion of the total variation in the left hand side variable, Y, is explained by the linear regression model?

 

Staple your Stata output to the other side of this page.

更多代写:计算机代写 托福代考 homework代写 多伦多论文代写 金融代写 统计分析代写