Urgenthomework logo
UrgentHomeWork
Live chat

Loading..

R Language Assignment Question 6

Problem Set 4

Please round numbers to 4 decimal places. Write down your answers clearly and show all the important steps you used in your calculations. You do not need to provide your programming code in R or STATA.

1 Problem 1 – Empirical Exercise

Download the data set on Guns (with n=1,173 observations provided by Stock and Watson) on NYU Classes (Folder Data). Import the excel file to your statistical software.

Consider the following variables:

  • Yit (vio): violent crime rate (incidents per 100,000 members of the population in state i and year t)
  • Xit (avginc): real per capita personal income in state i and year t, in thousands of dollars

Consider only observations in the year 1986 throughout the whole problem set!

1.1 Part 1

Consider the following regression model for the year 1986:

Yit=β0+Uit, t=86 (1) 1. Write down the objective function of the least squares method.

Consider only observations of the year 1986.

  1. Derive the OLS estimator βˆ0 for β0 in regression model (1) as a function of {Yit}.
  2. Estimate regression model (1) using the OLS regression command from your statistical software. Write down the estimate βˆ0.
  3. Interpret the estimate βˆ0.
  4. What is the value of the sample variance of the fitted values, s2ˆ ?
  5. What is the value of the coefficient of determination of regression R2 in model (1)? Interpret the value of R2 and explain in 1-2 sentences why R2 takes on this specific value.

1.2 Part 2

Consider now the following regression model:
Yit =β0+β1Xit+εit, t=86 withεi|Xit ∼i.i.dN(0,σε2) (2)

  1. Estimate regression model (2) using the OLS regression command. Write down the estimates βˆ0 and βˆ1.
  2. Write down the standard errors of the estimators βˆ0 and βˆ1.
  3. Writedownthegeneral(conditional)distributionoftheestimatorβˆ1|Xit (with distribution parameters).
    Note: You do not need to derive the variance formula. You can use the corresponding variance formula from the lecture slides.
  4. Write down the unbiased estimator σˆε2 for the noise variance σε2. (Be careful to distinguish between εˆ and ε !)
  1. Write down the sum of squared residuals (SSR) of regression model (2).
  2. Compute σˆε2.
  3. Compute the 90% confidence interval for β1 (and write down the for- mula that you are using).

Consider the one-sided test with H0 : β1 ≥ 60.

  1. Write down the (most critical, conditional) distribution of the OLS estimator, βˆ1|Xit, under the null hypothesis.
  2. Write down the test statistic and its distribution under the null hypothesis.
  3. Compute the test statistic.
  4. Compute the p-value [make your approach to the question clear by writ- ing down the corresponding probabilities]. What do you conclude?

1.3 Part 3

Consider now the following regression model:
Yit=β1Xit+εit, t=86 withεi|Xit∼i.i.dN(0,σε2) (3)

  1. Estimate regression model (3) using the OLS regression command. Write down the estimate βˆ1.
  2. Write down the standard errors of the estimators βˆ1.
  3. Compute Y2.
  4. Write down the total sum of squares (TSS). What is the difference between Y 2 and TSS? Explain why the total sum of squares are i i,86 larger than in model (1).

Hint: When X has no explanatory power in (3), the baseline model (to which the model fit is compared) becomes Y ̃ |β1 =0 = 0 instead of Y ̄ .

Copyright © 2009-2023 UrgentHomework.com, All right reserved.