42197 039042 3642 0000284 k 033306 005136 6485 139e 10 l 069702 011434 6096

42197 039042 3642 0000284 k 033306 005136 6485 139e

This preview shows page 2 - 4 out of 4 pages.

1.42197 0.39042 3.642 0.000284 *** ## k 0.33306 0.05136 6.485 1.39e-10 *** ## l 0.69702 0.11434 6.096 1.55e-09 *** ## phi 1.05143 0.05618 18.715 < 2e-16 *** ## --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 ## ## Residual standard error: 0.4906 on 996 degrees of freedom ## Multiple R-squared: 0.3206, Adjusted R-squared: 0.3185 ## F-statistic: 156.7 on 3 and 996 DF, p-value: < 2.2e-16 cp = reg$coefficients ["k"] + reg$coefficients ["l"] cp ## k ## 1.030083 H0 = c("k+l=1") library ("car") ## Loading required package: carData linearHypothesis(reg,H0)
Image of page 2
7/3/19, 6)46 PM HW 1 Page 3 of 4 ## Linear hypothesis test ## ## Hypothesis: ## k + l = 1 ## ## Model 1: restricted model ## Model 2: y ~ k + l + phi ## ## Res.Df RSS Df Sum of Sq F Pr(>F) ## 1 997 239.70 ## 2 996 239.69 1 0.01471 0.0611 0.8048 # F score is 0.0611 so is smaller than c.v. so we accept H0 Question 2 - d reg2 = lm(y~k+l,data=df) summary(reg2) ## ## Call: ## lm(formula = y ~ k + l, data = df) ## ## Residuals: ## Min 1Q Median 3Q Max ## -1.56108 -0.39894 -0.00303 0.39862 2.14591 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) 1.01628 0.45298 2.244 0.0251 * ## k 0.29191 0.05962 4.896 1.14e-06 *** ## l 1.00828 0.13146 7.670 4.08e-14 *** ## --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 ## ## Residual standard error: 0.57 on 997 degrees of freedom ## Multiple R-squared: 0.08166, Adjusted R-squared: 0.07982 ## F-statistic: 44.33 on 2 and 997 DF, p-value: < 2.2e-16 Question 2 - f library ("AER")
Image of page 3
7/3/19, 6)46 PM HW 1 Page 4 of 4 ## Loading required package: lmtest ## Loading required package: zoo ## ## Attaching package: 'zoo' ## The following objects are masked from 'package:base': ## ## as.Date, as.Date.numeric ## Loading required package: sandwich ## Loading required package: survival iv = ivreg(y~k+l|w+K,data = df) summary(iv) ## ## Call: ## ivreg(formula = y ~ k + l | w + K, data = df) ## ## Residuals: ## Min 1Q Median 3Q Max ## -1.55786 -0.39820 -0.01146 0.39246 2.15743 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) 1.97030 0.48205 4.087 4.71e-05 *** ## k 0.29770 0.06035 4.933 9.48e-07 *** ## l 0.72045 0.14059 5.125 3.58e-07 *** ## --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 ## ## Residual standard error: 0.5714 on 997 degrees of freedom ## Multiple R-Squared: 0.07724, Adjusted R-squared: 0.07539 ## Wald test: 27.39 on 2 and 997 DF, p-value: 2.623e-12
Image of page 4

You've reached the end of your free preview.

Want to read all 4 pages?

  • Spring '08
  • Staff
  • Normal Distribution, Errors and residuals in statistics, setwd, 2.713 l, 10.00 Min

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture