Practice Questions, Week 7 - 10 (Solutions)

pdf

School

The Chinese University of Hong Kong *

*We aren’t endorsed by this school

Course

3420

Subject

Economics

Date

Nov 24, 2024

Type

pdf

Pages

3

Uploaded by nkc.alanng529

Report
MGEC11, Practice Questions, Week 7 - 10 Yue Yu library(wooldridge) library(car) library(lmtest) library(sandwich) library(margins) Q1 (i) The minimum possible value is 0, while the maximum possible score is 100. As shown below, the minimum and maximum values in the sample are 19.53 and 98.44, correspondingly. data( econmath ) summary(econmath$score) ## Min. 1st Qu. Median Mean 3rd Qu. Max. ## 19.53 64.06 74.22 72.60 82.79 98.44 (ii) Because if MLR6 holds, u is independent from the other three explanatory variables and u follows a normal distribution. As a result, there are chances that u is very large, and hence the score is greater than 100. Similarly, u can be negative, and in such cases the score can be lower than 0. But as discussed in (i), the score is bounded in between 0 and 100. Therefore, it is problematic to assume that Assumption MLR.6 holds for the error term u. If Assumption MLR6 does not hold, the usual t-stat does not follow a normal distribution, and we cannot use the usual t-stat to test the null hypothesis. (iii) q1.ols1 <- lm( score ~ colgpa + actmth + acteng, data= econmath) summary(q1.ols1) ## ## Call: ## lm(formula = score ~ colgpa + actmth + acteng, data = econmath) ## ## Residuals: ## Min 1Q Median 3Q Max ## -39.855 -6.215 0.444 6.812 32.670 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) 16.17402 2.80044 5.776 1.09e-08 *** 1
## colgpa 12.36620 0.71506 17.294 < 2e-16 *** ## actmth 0.88335 0.11220 7.873 1.11e-14 *** ## acteng 0.05176 0.11106 0.466 0.641 ## --- ## Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 ## ## Residual standard error: 10.35 on 810 degrees of freedom ## (42 observations deleted due to missingness) ## Multiple R-squared: 0.3972, Adjusted R-squared: 0.395 ## F-statistic: 177.9 on 3 and 810 DF, p-value: < 2.2e-16 When the sample size is large enough, the t-statistic has an asymptotically normal distribution. Hence we can still use the p-value reported in (ii) for hypothesis testing. (iv) bptest(q1.ols1, varformula = ~ colgpa + actmth + acteng + I(colgpaˆ 2 ) + I(actmthˆ 2 )+ I(actengˆ 2 )+I( colgpa*actmth) + I( colgpa*acteng) + I(acteng*actmth), data = econmath) ## ## studentized Breusch-Pagan test ## ## data: q1.ols1 ## BP = 50.387, df = 9, p-value = 9.108e-08 We reject the null hypothesis of homoskedasticity at 5% significance level. coeftest(q1.ols1, vcov = vcovHC(q1.ols1, type = "HC0" )) ## ## t test of coefficients: ## ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) 16.174018 3.111242 5.1986 2.545e-07 *** ## colgpa 12.366201 0.752853 16.4258 < 2.2e-16 *** ## actmth 0.883352 0.112126 7.8782 1.068e-14 *** ## acteng 0.051764 0.107468 0.4817 0.6302 ## --- ## Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 (v) Null hypothesis β 2 = 0 and β 3 = 0 . Alternative hypothesis: at least one coefficient is not 0. linearHypothesis(q1.ols1, c( "actmth=0" , "acteng=0" ), white.adjust = "hc0" ) ## Linear hypothesis test ## ## Hypothesis: ## actmth = 0 ## acteng = 0 ## ## Model 1: restricted model ## Model 2: score ~ colgpa + actmth + acteng ## ## Note: Coefficient covariance matrix supplied. 2
## ## Res.Df Df F Pr(>F) ## 1 812 ## 2 810 2 37.285 3.235e-16 *** ## --- ## Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 Based on the F-test (F-stat at 37.285, with associated p-value at 3.235e-16), reject the null hypothesis at 5% significance level. (iv) This is an open question. You need to come up with a variable that affects the outcome variable and correlates with the explanatory variables, and it needs to be theoretically plausible. (vii) No. If there is omitted variable bias that means a violation of MLR4. Even if the sample size gets large, the OLS estimators are consistent to the wrong values instead of the actual parameter values we are interested in. 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help