You are on page 1of 11

# Chapter 5 > ans1a<-lm(ahe~age) > summary(ans1a) Call: lm(formula = ahe ~ age) Residuals: Min 1Q Median 3Q Max -19.248 -6.

964 -1.924 4.536 63.186 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.08228 1.18426 0.914 0.361 age 0.60499 0.03985 15.180 <2e-16 *** --Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 9.992 on 7709 degrees of freedom Multiple R-squared: 0.02902, Adjusted R-squared: 0.0289 F-statistic: 230.4 on 1 and 7709 DF, p-value: < 2.2e-16

a.For 10% 2-sided significance level, critical value of t-stat = 1.64 5% = 1.96 1%=2.58 As the model suggests that the t-value for standard error = 15.180. So, we reject the null hypothesis that β = 0 and conclude that the regression coefficient is statistically significant. b. For 95% confidence interval β should lie between (0.605 - 1.96*0.04, 0.605+1.96*0.04).

c. rishav2<-read.table("D:\\econometrics.txt",header=TRUE) > attach(rishav2) > ans1c=lm(ahe~age) > summary(ans1c) Call: lm(formula = ahe ~ age) Residuals: Min 1Q Median 3Q Max -23.792 -7.359 -2.034 5.400 59.119 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -4.43916 1.79999 -2.466 0.0137 * MBA:-652 ASSIGNMENT 2 SUBMITTED BY:-RISHAV SHIV RANJAN 12114011 M.TECH IME

rishav3<-read. codes: 0 ‘***’ 0.551 Coefficients: Estimate Std.01199. p-value: 3. p-value: < 2.351 3.63 on 3707 degrees of freedom Multiple R-squared: 0.header=TRUE) > attach(rishav3) The following object(s) are masked from 'rishav2': age. So. critical value of t-stat = 1.225 57. codes: 0 ‘***’ 0.01 ‘*’ 0.111 -1.727e-12 For 10% 2-sided significance level.05 ‘.05914.TECH IME . critical value of t-stat = 1.04274 6.969 3.01 ‘*’ 0.table("D:\\neweconometrics.96 1%=2.001 ‘**’ 0.001 ‘**’ 0.1 ‘ ’ 1 Residual standard error: 10.135 2. ahe The following object(s) are masked from 'rishav1': age.age 0.26999 5.29786 0.05 ‘.265.01175 F-statistic: 48.96 1%=2.92460 0. ahe > ans1d=lm(ahe~age) > summary(ans1d) Call: lm(formula = ahe ~ age) Residuals: Min 1Q Median 3Q Max -14. Adjusted R-squared: 0.64 5% = 1. d.06057 15.2e-16 > For 10% 2-sided significance level. we reject the null hypothesis that β = 0 and conclude that the regression coefficient is statistically significant.05889 F-statistic: 233 on 1 and 3707 DF.txt".95e-07 *** age 0.56 on 1 and 4000 DF.265 <2e-16 *** --Signif.’ 0.73e-12 *** --Signif.1 ‘ ’ 1 Multiple R-squared: 0.64 5% = 1.58 As the model suggests that the t-value for standard error = 15.’ 0.245 -5.58 MBA:-652 ASSIGNMENT 2 SUBMITTED BY:-RISHAV SHIV RANJAN 12114011 M. Adjusted R-squared: 0. Error t value Pr(>|t|) (Intercept) 6.52194 1.

p-value: 1.01375.001 ‘**’ 0. > ans3c=lm(ed~dist) > summary(ans3c) Call: lm(formula = ed ~ dist) MBA:-652 ASSIGNMENT 2 SUBMITTED BY:-RISHAV SHIV RANJAN 12114011 M.txt") > rishav5<. So. b.table("D:\\CollegeDistance.1 ‘ ’ 1 Residual standard error: 1.133.read.58 As the model suggests that the t-value for standard error = 5.05 ‘.96 1%=2. 95% confidence interval for slope coefficient = (-0. codes: 0 ‘***’ 0. Error t value Pr(>|t|) (Intercept) 13.58 As the model suggests that the t-value for standard error = 4.48 on 1 and 3794 DF.07337 – 0.00745. ANSWER TO 5.0515 4.TECH IME .007188 F-statistic: 28.4844 Coefficients: Estimate Std.03772 369.3 > load("D:\\CollegeDistance. we reject the null hypothesis that β = 0 for above all significance level and conclude that the regression coefficient is statistically significant.6624 2.07337+0.004e-07 For 10% 2-sided significance level.25e-05. p-value =4.336.01375 -5.95586 0.945 <2e-16 *** dist -0.9559 -1. critical value of t-stat = 1.txt".header=TRUE) > attach(rishav5) > ans3=lm(ed~dist) > summary(ans3) Call: lm(formula = ed ~ dist) Residuals: Min 1Q Median 3Q Max -1. -0. So.01 ‘*’ 0.07337 0.1%=2.64 5% = 1. Adjusted R-squared: 0. we reject the null hypothesis for above all significance level that β = 0 and conclude that the regression coefficient is statistically significant.’ 0.8091 -0.807 on 3794 degrees of freedom Multiple R-squared: 0.336 1e-07 *** --Signif.01375) c.

10401 .’ 0.001 ‘**’ 0. Adjusted R-squared: 0.001 ‘**’ 0.08384 .06267) e.802 on 2068 degrees of freedom (1726 observations deleted due to missingness) Multiple R-squared: 0.38e-05 *** --Signif.05593 249.08384 + 0.06417 – 0. -0.412 0.05 ‘.01881.0006567 95% confidence interval for slope coefficient = (-0. So.939 < 2e-16 *** dist -0.93587 0.08298.08384 – 0. -0.06417 0.Residuals: Min 1Q Median 3Q Max -1.08384 0. n1 = 20 β for male is β2 =0.01881 -3.28 on 1 and 1724 DF. codes: 0 ‘***’ 0.02017.009351 F-statistic: 17.97899 0. -0. std error s2 = 0. we conclude that the effect on earnings different high school graduates and college graduates.6632 2. Error t value Pr(>|t|) (Intercept) 13. n2 = 1726 for 1% significance level.009925. > summary(ans1d) Call: lm(formula = ed ~ dist) Residuals: Min 1Q Median 3Q Max -1. we’ve obtained the result and found that β2 > β1.06417 .02017) = = (-0.593 < 2e-16 *** dist -0. -0.157 3.01881) = (-0.02017.05112 272. p-value: 3.1 ‘ ’ 1 Multiple R-squared: 0.8113 -0.TECH IME . Adjusted R-squared: 0.005599.05 ‘.64 on 1 and 2068 DF.06417+0.38e-05 95% confidence interval for slope coefficient = (-0. std error s1 = 0. codes: 0 ‘***’ 0.0294 4. p-value: 0.9359 -1.01881.005118 F-statistic: 11. Error t value Pr(>|t|) (Intercept) 13.’ 0. MBA:-652 ASSIGNMENT 2 SUBMITTED BY:-RISHAV SHIV RANJAN 12114011 M.6856 2.02017 -4.01 ‘*’ 0.8075 -0.3983 Coefficients: Estimate Std. β for female is β1 =0.0706 4.9790 -1.4491 Coefficients: Estimate Std.01 ‘*’ 0.000657 *** --Signif.04536) d.1 ‘ ’ 1 Residual standard error: 1.

txt".80015 -0.01 ‘*’ 0.133 * Beauty The estimated slope is 0.table("D:\\Econometrics\\TeachingRatings. Error t value Pr(>|t|) (Intercept) 3.TECH IME . b) > model1=lm(course_eval~beauty+intro+onecredit+female+minority+nnenglish) > summary(model1) Call: lm(formula = course_eval ~ beauty + intro + onecredit + female + minority + nnenglish) MBA:-652 ASSIGNMENT 2 SUBMITTED BY:-RISHAV SHIV RANJAN 12114011 M.133.10373 Coefficients: Estimate Std. header=TRUE) > attach(data1) > model1=lm(course_eval~beauty) > summary(model1) Call: lm(formula = course_eval ~ beauty) Residuals: Min 1Q Median 3Q Max -1.133 4.247e-05 Regression of course_eval on beauty: course_eval = 3.36304 0.25e-05 *** --Signif. p-value: 4.727 < 2e-16 *** beauty 0.03574. codes: 0 ‘***’ 0.02535 157.1 a) > data1 <.998 + 0.05 ‘. Adjusted R-squared: 0.99827 0.13300 0.03364 F-statistic: 17.1 ‘ ’ 1 Residual standard error: 0.read.40207 1.5455 on 461 degrees of freedom Multiple R-squared: 0.’ 0.03218 4.07254 0.Chapter 6 ANSWER TO E6.001 ‘**’ 0.08 on 1 and 461 DF.

9 on 6 and 456 DF.165.1 ‘ ’ 1 Residual standard error: 0.84611 -0.634*onecredit – 0.283 0.03073 5.16662 0. d) > newdata1=data.nnenglish=0.05 ‘.184 0.029448 * nnenglish -0.520 0.14e-07 *** intro 0.1546.07628 -2.01 ‘*’ 0.TECH IME .173*female – 0.’ 0.03754 108.05448 0.17e-08 *** female -0. p-value: 1.901673 So Professor Smith’s predicted course evaluation is 3.05872 Coefficients: Estimate Std.113*intro + 0.17348 0.001 ‘**’ 0.244*nnenglish The estimated effect of beauty on course_eval is 0.04928 -3.onecredit=0.389 1.24416 0.901 MBA:-652 ASSIGNMENT 2 SUBMITTED BY:-RISHAV SHIV RANJAN 12114011 M.06829 0.beauty=0) > predict(model1.1666*minority – 0.529e-14 Using additional regressors.16561 0.Residuals: Min 1Q Median 3Q Max -1.022903 * --Signif.01133 0.63453 0.1435 F-statistic: 13.000474 *** minority -0.068 + 0.699 2.835413 onecredit 0. there isn’t omitted variable bias.165*beauty + 0.33300 0. Adjusted R-squared: 0.frame(female=0.5135 on 456 degrees of freedom Multiple R-squared: 0. codes: 0 ‘***’ 0. Since the effect of beauty on course_eval isn’t substantially different. we obtain the following regression equation: Course_eval= 4. Error t value Pr(>|t|) (Intercept) 4.37672 1.10696 -2.208 0.364 < 2e-16 *** beauty 0.04912 0.intro=0.minority=1.11134 5. newdata1) 1 3.

03154 0.15213 0.09382 0.2 a) > data2 <. c) Yes.ANSWER TO E 6.0315387.02321 -0.05178 After incorporating other regressors mentioned in the problem.table("D:\\Econometrics\\CollegeDistance.39852 incomehi ownhome dadcoll cue80 stwmfg80 0.07 b) > model2=lm(ed~dist+bytest+female+black+hispanic+incomehi+ownhome+dadcoll+cue80+stwmfg80) > model2 Call: lm(formula = ed ~ dist + bytest + female + black + hispanic + incomehi + ownhome + dadcoll + cue80 + stwmfg80) Coefficients: (Intercept) dist bytest female black hispanic 8. d) > summary(model1) MBA:-652 ASSIGNMENT 2 SUBMITTED BY:-RISHAV SHIV RANJAN 12114011 M.36797 0.header=TRUE) > attach(data2) > model1=lm(ed~dist) > model1 Call: lm(formula = ed ~ dist) Coefficients: (Intercept) dist 13. the regression in a) seems to suffer from important omitted variable bias as there is an increase in the coefficient value when additional regressors are added.14541 0.txt".82752 -0.07337 The estimated slope is -0.95586 -0.read.69613 0. the estimated effect of dist on ed is -.TECH IME .39520 0.

p-value: < 2.5.female=0.black=1.542 on 3785 degrees of freedom Multiple R-squared: 0.02321 and -0. Adjusted R-squared: 0. negative and positive because unemployment rate would be inversely proportional to years of schooling and hourly wage would be directly proportional to the years of schooling.momcoll=1. f) Cue80 measures County Unemployment rate in 1980 and stwmfg80 measures State Hourly Wage in Manufacturing in 1980. p-value: 1. dadcoll=0.79051 Bob’s years of completed schooling using regression in b) is 14.807 on 3794 degrees of freedom Multiple R-squared: 0. these two factors do not have much effect on the dependent variable. regression in b) is a better fit e) The coefficient on dadcoll is positive.2e-16 Based on both R-square and adjusted R-square.TECH IME . model 2 i. The two variables appear in regression because no. The magnitudes of the two variables are 0. ownhome=1. incomehi=1.004e-07 > summary(model2) Residual standard error: 1. ownhome=1. incomehi=1.stwmfg80=9. of years of education is affected by the employment rate and wage rates.48 on 1 and 3794 DF.female=0. dadcoll=0.e.6961.2769 F-statistic: 146. Adjusted R-squared: 0.75.hispanic=0) > predict(model2.Residual standard error: 1.e.2788. cue80=7.stwmfg80=9.hispanic=0) > predict(model2.3 on 10 and 3785 DF. The variable dadcoll measures whether a student’s father attended college or not.bytest=58.79 years. So the positive value suggests that if a student’s dad went to college.black=1. newdata) 1 MBA:-652 ASSIGNMENT 2 SUBMITTED BY:-RISHAV SHIV RANJAN 12114011 M. The value of cue80 obtained is positive and that of stwmfg80 is negative. h) > newdata=data.75.696 times more likely to go. cue80=7.05178. g) > newdata=data.bytest=58.007188 F-statistic: 28. Whereas I would have believed it to be the opposite i.e.frame(dist=2.5. then the student is . which is 0. which are quite low i.frame(dist=4. newdata) 1 14.momcoll=1.00745.