Please include the R code for each individual question.
R- commands with out put
>
y=c(14.7,48.0,25.6,10.0,16.0,16.8,20.7,38.8,16.9,27.0,16.0,24.9,7.3,12.8)
> y
[1] 14.7 48.0 25.6 10.0 16.0 16.8 20.7 38.8 16.9 27.0 16.0 24.9 7.3
12.8
>
x1=c(8.9,36.6,36.8,6.1,6.9,6.9,7.3,8.4,6.5,8.0,4.5,9.9,2.9,2.0)
> x1
[1] 8.9 36.6 36.8 6.1 6.9 6.9 7.3 8.4 6.5 8.0 4.5 9.9 2.9 2.0
>
x2=c(31.5,27.0,25.9,39.1,39.2,38.3,33.9,33.8,27.9,33.1,26.3,37.0,34.6,36.4)
> x2
[1] 31.5 27.0 25.9 39.1 39.2 38.3 33.9 33.8 27.9 33.1 26.3 37.0
34.6 36.4
> x3=x1*x1
> x4=x2*x2
> x5=x1*x2
> fit=lm(y~x1+x2+x3+x4+x5)
> fit
Call:
lm(formula = y ~ x1 + x2 + x3 + x4 + x5)
Coefficients:
(Intercept) x1 x2 x3 x4 x5
-140.22976 -16.47521 12.82710 0.09555 -0.24339
0.49864
> summary(fit)
Call:
lm(formula = y ~ x1 + x2 + x3 + x4 + x5)
Residuals:
Min 1Q Median 3Q Max
-8.349 -2.188 0.279 1.649 13.613
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -140.22976 136.13743 -1.030 0.3331
x1 -16.47521 9.07116 -1.816 0.1069
x2 12.82710 8.25854 1.553 0.1590
x3 0.09555 0.07206 1.326 0.2214
x4 -0.24339 0.12744 -1.910 0.0925 .
x5 0.49864 0.23543 2.118 0.0670 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 7.023 on 8 degrees of freedom
Multiple R-squared: 0.7561, Adjusted R-squared: 0.6037
F-statistic: 4.961 on 5 and 8 DF, p-value: 0.02307
> Residuals=resid(fit)
> Residuals
1 2 3 4 5 6 7
-8.3487300 1.5754583 -1.4933155 -1.1941138 1.6740011 0.1382374
-2.4192665
8 9 10 11 12 13 14
13.6129620 1.3376151 2.9644709 0.4196648 -5.1782487 -7.9658627
4.8771276
> predicted=fitted(fit)
> predicted
1 2 3 4 5 6 7 8
23.048730 46.424542 27.093316 11.194114 14.325999 16.661763
23.119267 25.187038
9 10 11 12 13 14
15.562385 24.035529 15.580335 30.078249 15.265863 7.922872
> plot(Residuals,predicted)
> fit2=lm(y~x1+x2)
> fit2
Call:
lm(formula = y ~ x1 + x2)
Coefficients:
(Intercept) x1 x2
14.8893 0.6607 -0.0284
> summary(fit2)
Call:
lm(formula = y ~ x1 + x2)
Residuals:
Min 1Q Median 3Q Max
-12.867 -4.475 -1.526 3.878 19.321
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 14.8893 23.2447 0.641 0.5349
x1 0.6607 0.2737 2.414 0.0344 *
x2 -0.0284 0.6423 -0.044 0.9655
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 9.019 on 11 degrees of freedom
Multiple R-squared: 0.447, Adjusted R-squared: 0.3465
F-statistic: 4.446 on 2 and 11 DF, p-value: 0.03845
____________________________________________________________________________________________
a)
Coefficients:
(Intercept) x1 x2 x3 x4 x5
-140.22976 -16.47521 12.82710 0.09555 -0.24339
0.49864
b)
Interpritation-
Intercept=-140.22976 indicates that the value of y at the point
where x1=x2=x3=x4=x5=0
slope(b1)=-16.47521 indicates that for unit change in x1, y
decreases with -16.47521.
slope(b2)=12.82710 indicates that for unit change in x1, y
increases with 12.82710.
slope(b3)=0.09555 indicates that for unit change in x1, y increases
with 0.09555.
slope(b4)=-0.24339 indicates that for unit change in x1, y
decreases with -0.24339.
slope(b5)=0.49864 indicates that for unit change in x1, y increases
with 0.49864.
c)
Rsquare = 0.7561 indicates that adequacy of the fitted model is
much good.
d)
Se = 7.023 indicates that predictive quality of a regression model
with lower Se.
e)see plot
f)
g)
R-squared = 0.447 indicates that adequacy of the fitted model is
good.
h)
Rsquare from first model is larger than the R square from the
second model suggest that one of the higher order terms in the
regression equation provides useful information about strengths
i.e. strengrh increases.
i)
Standard error of the second model is 9.019 which is larger the
first model (Se = 7.023 ) indicates predictive quality of first
regression model is larger.
Please include the R code for each individual question. Save PDF to My Note The article...
-/6 points PeckDevStat7 14.E.029. My Notes Ask Your The article The Undrained Strength of Some Thawed Permafrost Soils" contained the accompanying data on the following. y shear strength of sandy soil (kPa) x depth (m) x2-water content (%) The predicted values and residuals were computed using the estimated regression equation where x3-x12, x4 x22, and xs x12 x2 Predicted y Residual 14.7 48.0 25.6 100 16.0 16.8 8.9 36.6 31.5 27.0 25.9 39.1 39.2 38.3 33.9 33.8 279 33.1 26.3...