Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For the data file, go to R and type in >install.packages(\"alr4\") give me the R

ID: 3597486 • Letter: F

Question

For the data file, go to R and type in >install.packages("alr4")

give me the R and step by step solution

5.8 Cake data (Data file: cakes) 5.8.1 Fit (5.12) and verify that the significance levels for the quadratic terms and the interaction are all less than 0.005. When fitting poly- nomials, tests concerning main effects in models that include a quadratic are generally not of much interest. 5.8.2The cake experiment was carried out in two blocks of seven obser vations each. It is possible that the response might differ by block. For example, if the blocks were different days, then differences in air temperature or humidity when the cakes were mixed might have some effect on Y. We can allow for block effects by adding a factor for block to the mean function and possibly allowing for block by regressor interactions. Add block effects to the mean function fit in Section 5.3.1 and summarize results. The blocking is indicated by the variable Block in the data file.

Explanation / Answer

fit<- lm(Y~X1+X2+I(X1^2)+I(X2^2)+X1:X2, data=cakes)
summary(fit)

summary(fit)

Call:
lm(formula = Y ~ X1 + X2 + I(X1^2) + I(X2^2) + X1:X2, data = cakes)

Residuals:
Min 1Q Median 3Q Max
-0.4912 -0.3080 0.0200 0.2658 0.5454

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -2.204e+03 2.416e+02 -9.125 1.67e-05 ***
X1 2.592e+01 4.659e+00 5.563 0.000533 ***
X2 9.918e+00 1.167e+00 8.502 2.81e-05 ***
I(X1^2) -1.569e-01 3.945e-02 -3.977 0.004079 **
I(X2^2) -1.195e-02 1.578e-03 -7.574 6.46e-05 ***
X1:X2 -4.163e-02 1.072e-02 -3.883 0.004654 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.4288 on 8 degrees of freedom
Multiple R-squared: 0.9487,   Adjusted R-squared: 0.9167
F-statistic: 29.6 on 5 and 8 DF, p-value: 5.864e-05

, here the model is signifcant enough and at the same time is able to explain 92% of the variation in the data