This question uses the package alr4 with the data set UN11. Please use R to show
ID: 3060232 • Letter: T
Question
This question uses the package alr4 with the data set UN11. Please use R to show your work.
region group fertility ppgdp lifeExpF pctUrban Asia other 5.968 6.212606 49.49 23 Europe other 1.525 8.209907 80.4 53 Africa africa 2.142 8.405815 75 67 Africa africa 5.135 8.37145 53.17 59 Caribbean other 2 9.528801 81.1 100 Latin Amer other 2.172 9.122831 79.89 93 Asia other 1.735 8.016549 77.33 64 Caribbean other 1.671 10.03677 77.75 47 Oceania oecd 1.949 10.95289 84.27 89 Europe oecd 1.346 10.71794 83.55 68 Asia other 2.148 8.637214 73.66 52 Caribbean other 1.877 10.01956 78.85 84 Asia other 2.43 9.808303 76.06 89 Asia other 2.157 6.507875 70.23 29 Caribbean other 1.575 9.581718 80.26 45 Europe other 1.479 8.648572 76.37 75 Europe oecd 1.835 10.68773 82.81 97 Latin Amer other 2.679 8.410899 77.81 53 Africa africa 5.078 6.608136 58.66 42 Caribbean other 1.76 11.43631 82.3 100 Asia other 2.258 7.624228 69.84 35 Latin Amer other 3.229 7.589791 69.4 67 Europe other 1.134 8.406865 78.4 49 Africa africa 2.617 8.909627 51.34 62 Latin Amer other 1.8 9.279456 77.41 87 Asia other 1.984 10.39353 80.64 76 Europe other 1.546 8.758585 77.12 72 Africa africa 5.75 6.253252 57.02 27 Africa africa 4.051 5.173887 52.58 11 Asia other 2.422 6.681106 65.1 20 Africa africa 4.287 7.095562 53.56 59 North America oecd 1.691 10.74421 83.49 81 Africa africa 2.279 8.084562 77.7 62 Caribbean other 1.6 10.95165 83.8 100 Africa africa 4.423 6.111024 51.3 39 Africa africa 5.737 6.589477 51.61 28 Latin Amer oecd 1.832 9.38326 82.35 89 Asia other 1.559 8.37885 75.61 48 Latin Amer other 2.293 8.735975 77.69 75 Africa africa 4.742 6.602045 63.18 28 Africa africa 4.442 7.887997 59.33 63 Oceania other 2.530806 9.410183 76.24547 76 Latin Amer other 1.812 8.949469 81.99 65 Africa africa 4.224 7.051076 57.71 51 Europe other 1.501 9.533836 80.37 58 Caribbean other 1.451 8.648993 81.33 75 Asia other 1.458 10.25289 82.14 71 Europe oecd 1.501 9.843674 81 74 Africa africa 5.485 5.301313 50.56 36 Europe oecd 1.885 10.93007 81.37 87 Africa africa 3.589 7.156645 60.04 76 Caribbean other 3 8.856632 78.2 67 Caribbean other 2.49 8.555529 76.57 70 Asia other 5.918 6.559757 64.2 29 Latin Amer other 2.393 8.312037 78.91 68 Africa africa 2.636 7.88371 75.52 44 Latin Amer other 2.171 8.139032 77.09 65 Africa africa 4.98 9.732248 52.91 40 Africa africa 4.243 6.06169 64.41 22 Europe oecd 1.702 9.556438 79.95 70 Africa africa 3.848 5.782594 61.59 17 Oceania other 2.602 8.173491 72.27 52 Europe oecd 1.875 10.70328 83.28 85 Europe oecd 1.987 10.58522 84.9 86 Oceania other 2.033 10.1133 78.07 51 Africa africa 3.195 9.430985 64.32 86 Africa africa 4.689 6.361475 60.3 59 Asia other 1.528 7.893684 77.31 53 Europe oecd 1.457 10.59306 82.99 74 Africa africa 3.988 7.195337 65.8 52 Europe oecd 1.54 10.18504 82.58 62 NorthAtlantic other 2.217 10.47143 71.6 84 Caribbean other 2.171 8.913147 77.72 40 Latin Amer other 3.84 7.966344 75.1 50 Africa africa 5.032 6.057954 56.39 36 Africa africa 4.877 6.290457 50.4 30 Latin Amer other 2.19 8.005033 73.45 29 Caribbean other 3.159 6.417875 63.87 54 Latin Amer other 2.996 7.613917 75.92 52 Asia other 1.137 10.36797 86.35 100 Europe oecd 1.43 9.463742 78.47 68 Europe other 2.098 10.57842 83.77 94 Asia other 2.538 7.248789 67.62 30 Asia other 2.055 7.989323 71.8 45 Asia other 1.587 8.561612 75.28 71 Asia other 4.535 6.789535 72.6 66 Europe oecd 2.097 10.74117 83.17 62 Asia oecd 2.909 10.28574 84.19 92 Europe oecd 1.476 10.43049 84.62 69 Caribbean other 2.262 8.496786 75.98 52 Asia oecd 1.418 10.67223 87.12 67 Asia other 2.889 8.399603 75.17 79 Asia other 2.481 9.123333 72.84 59 Africa africa 4.623 6.686859 59.16 23 Oceania other 3.5 7.291792 63.1 44 Asia other 2.251 10.72394 75.89 98 Asia other 2.621 6.763192 72.36 35 Asia other 2.543 6.954257 69.42 34 Europe other 1.506 9.274535 78.51 68 Asia other 1.764 9.136015 75.07 87 Africa africa 3.051 6.888267 48.11 28 Africa africa 5.038 5.387244 58.59 48 Africa africa 2.41 9.334397 77.86 78 Europe other 1.495 9.303421 78.28 67 Europe oecd 1.683 11.56262 82.67 85 Asia other 1.163 10.81958 83.8 100 Africa africa 4.493 6.044768 68.61 31 Africa africa 5.968 5.878856 55.17 20 Asia other 2.572 9.032744 76.86 73 Asia other 1.668 8.452014 78.7 41 Africa africa 6.117 6.394928 53.14 37 Europe other 1.284 9.883244 82.29 95 Oceania other 4.384466 8.029237 70.6 72 Africa africa 4.361 7.030946 60.95 42 Africa africa 1.59 8.921097 76.89 42 Latin Amer oecd 2.227 9.116107 79.64 78 Oceania other 3.307 7.8929 70.17 23 Europe other 1.45 7.393755 73.48 48 Asia other 2.446 7.717218 72.83 63 Europe other 1.63 8.781064 77.37 61 Africa africa 2.183 7.960324 74.86 59 Africa africa 4.713 6.010041 51.81 39 Asia other 1.939 6.775594 67.87 34 Africa africa 3.055 8.541827 63.04 39 Oceania other 3.3 8.730707 57.1 100 Asia other 2.587 6.281706 70.05 19 Caribbean other 1.9 9.919415 79.86 93 Europe oecd 1.794 10.75598 82.79 83 Oceania other 2.091 10.47219 80.49 57 Oceania oecd 2.135 10.38505 82.77 86 Latin Amer other 2.5 7.031653 77.45 58 Africa africa 6.925 5.879695 55.77 17 Africa africa 5.431 7.122705 53.38 51 Asia other 1.988 6.222576 72.12 60 Europe oecd 1.948 11.34556 83.47 80 Asia other 2.146 9.942275 76.44 73 Asia other 3.201 6.91095 66.88 36 Oceania other 2 9.289318 72.1 84 Asia other 4.27 7.506317 74.81 74 Latin Amer other 2.409 8.937744 79.07 75 Oceania other 3.799 7.26431 65.52 13 Latin Amer other 2.858 7.927 74.91 62 Latin Amer other 2.41 8.596134 76.9 77 Asia other 3.05 7.668608 72.57 49 Europe oecd 1.415 9.414358 80.56 61 Europe oecd 1.312 9.972902 82.76 61 Caribbean other 1.757 10.18343 83.2 99 Asia other 2.204 11.18993 78.24 96 Asia other 1.389 9.95476 83.95 83 Europe other 1.428 8.925641 77.95 58 Europe other 1.529 9.244877 75.01 73 Africa africa 5.282 6.277207 57.13 19 Caribbean other 1.907 8.806439 77.54 28 Oceania other 3.763 8.114714 76.02 20 Africa africa 3.488 7.15719 66.48 63 Asia other 2.639 9.670035 75.57 82 Africa africa 4.605 6.939932 60.92 43 Europe other 1.562 8.541535 77.05 56 Africa africa 2.34 9.345797 78 56 Africa africa 4.728 5.862779 48.87 39 Asia other 1.367 10.687 83.71 100 Europe oecd 1.372 9.678843 79.53 55 Europe oecd 1.477 10.04801 82.84 49 Oceania other 4.041 7.084645 70 19 Africa africa 6.283 4.743191 53.38 38 Africa africa 2.383 8.889419 54.09 62 Europe other 1.504 10.32688 84.76 78 Asia other 2.235 7.772879 78.4 14 Caribbean other 1.995 8.72773 74.73 50 Africa africa 4.225 7.50928 63.82 41 Latin Amer other 2.266 8.856234 74.18 70 Africa africa 3.174 8.105066 48.54 21 Europe oecd 1.925 10.79766 83.65 85 Europe oecd 1.536 11.14012 84.71 74 Asia other 2.772 7.98327 77.72 56 Asia other 3.162 6.704414 71.23 26 Africa africa 5.499 6.246107 60.31 27 Europe other 1.397 8.39717 77.14 59 Asia other 1.528 8.43659 77.76 34 Africa africa 3.864 6.262636 59.4 44 Oceania other 3.783 8.172757 75.38 24 Caribbean other 1.632 9.629386 73.82 14 Africa africa 1.909 8.348088 77.05 68 Asia oecd 2.022 9.219805 76.61 70 Asia other 2.316 8.43109 69.4 50 Oceania other 3.7 8.066898 65.1 51 Africa africa 5.901 6.232448 55.44 13 Europe other 1.483 8.017967 74.58 69 Asia other 1.707 10.58721 78.02 84 Europe oecd 1.867 10.50031 82.42 80 North America oecd 2.077 10.74819 81.31 83 Latin Amer other 2.043 9.388687 80.66 93 Asia other 2.264 7.26354 71.9 36 Oceania other 3.75 7.994126 73.58 26 Latin Amer other 2.391 9.510645 77.73 94 Asia other 1.75 7.075555 77.44 31 Asia other 4.938 7.270452 67.66 32 Africa africa 6.3 7.121091 50.04 36 Africa africa 3.109 6.35106 52.72 39 4.7 (Data file: UN11) Verify that in the regression log(fertility) - log(ppg decrease in eeExpF a 25% increase in ppgdp is associated withExplanation / Answer
> install.packages("alr4")
Installing package into ‘C:/Users/Shubham Kumar/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘effects’
trying URL 'https://mran.microsoft.com/snapshot/2017-09-01/bin/windows/contrib/3.4/effects_3.1-2.zip'
Content type 'application/zip' length 239533 bytes (233 KB)
downloaded 233 KB
trying URL 'https://mran.microsoft.com/snapshot/2017-09-01/bin/windows/contrib/3.4/alr4_1.0.5.zip'
Content type 'application/zip' length 695435 bytes (679 KB)
downloaded 679 KB
package ‘effects’ successfully unpacked and MD5 sums checked
package ‘alr4’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:UsersShubham KumarAppDataLocalTempRtmpUZ9bWJdownloaded_packages
> library("alr4", lib.loc="~/R/win-library/3.4")
Loading required package: car
Loading required package: effects
Attaching package: ‘effects’
The following object is masked from ‘package:car’:
Prestige
> model <- lm(log(fertility) ~ log(ppgdp) + lifeExpF, data = UN11)
> model
Call:
lm(formula = log(fertility) ~ log(ppgdp) + lifeExpF, data = UN11)
Coefficients:
(Intercept) log(ppgdp) lifeExpF
3.50736 -0.06544 -0.02824
> summary(model)
Call:
lm(formula = log(fertility) ~ log(ppgdp) + lifeExpF, data = UN11)
Residuals:
Min 1Q Median 3Q Max
-0.61778 -0.16891 0.03731 0.17591 0.61072
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.50736 0.12707 27.601 < 2e-16 ***
log(ppgdp) -0.06544 0.01781 -3.675 0.000307 ***
lifeExpF -0.02824 0.00274 -10.306 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.248 on 196 degrees of freedom
Multiple R-squared: 0.6926, Adjusted R-squared: 0.6894
F-statistic: 220.8 on 2 and 196 DF, p-value: < 2.2e-16
HENCE:
log(fertility) = 3.50736 - 0.06544 * log(ppgdp) - 0.02824 * lifeExpF
Let the original ppgdp = p a
now if ppgdp is increased by 25%,
new ppgdp = p + 0.25 * p = 1.25 * p
Hence the expected decrease in expected fertility associated with a 25% increase in ppgdp
= 0.06544 * log(1.25)
= 0.06544 * 0.2231436
= 0.01460251
~ 0.014
= 1.4%
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.