1 Median 10133 Median 3000 Median 1685 Mean 1900 Mean 10125 Mean 2903 Mean 1748

1 median 10133 median 3000 median 1685 mean 1900 mean

This preview shows page 12 - 15 out of 15 pages.

Median : 156.1 Median :10.133 Median :30.00 Median :1.685 ## Mean : 190.0 Mean :10.125 Mean :29.03 Mean :1.748 ## 3rd Qu.: 241.3 3rd Qu.:12.650 3rd Qu.:31.00 3rd Qu.:2.131 ## Max. :1433.1 Max. :14.972 Max. :35.00 Max. :2.713 ## w y k l ## Min. :10.00 Min. :3.453 Min. :1.612 Min. :1.946 ## 1st Qu.:10.20 1st Qu.:4.653 1st Qu.:2.025 1st Qu.:3.332 ## Median :10.97 Median :5.051 Median :2.316 Median :3.401 ## Mean :12.06 Mean :5.067 Mean :2.271 Mean :3.360 ## 3rd Qu.:12.68 3rd Qu.:5.486 3rd Qu.:2.538 3rd Qu.:3.434 ## Max. :35.57 Max. :7.268 Max. :2.706 Max. :3.555 ## phi ## Min. :0.0006878 ## 1st Qu.:0.2953200 ## Median :0.5215299 ## Mean :0.5200084 ## 3rd Qu.:0.7567298 ## Max. :0.9979599 Question 2 - b reg = lm(y~k+l+phi,data=df) summary(reg)
Image of page 12
7/3/19, 6)46 PM HW 1 Page 2 of 4 ## ## Call: ## lm(formula = y ~ k + l + phi, data = df) ## ## Residuals: ## Min 1Q Median 3Q Max ## -1.49782 -0.33644 -0.00446 0.35757 1.79309 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) 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 13
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 14
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 15

You've reached the end of your free preview.

Want to read all 15 pages?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture