Description Usage Format Source References Examples
In a completely randomized design with a 2x3x5 factorial treatment structure, researchers randomly assigned one of 30 treatment combinations to open-topped growing chambers, in which two soybean cultivars were planted. The responses for each chamber were the yields of the two types of soybean.
1 |
A data frame with 30 observations on the following 5 variables.
Stress
a factor indicating treatment, with two levels
"Well-watered"
and "Stressed"
SO2
a quantitative treatment with three levels 0, 0.02 and 0.06
O3
a quantitative treatment with five levels 0.02, 0.05, 0.07, 0.08 and 0.10
Forrest
the yield of the Forrest cultivar of soybean (in kg/ha)
William
the yield of the Williams cultivar of soybean (in kg/ha)
Ramsey, F.L. and Schafer, D.W. (2002). The Statistical Sleuth: A Course in Methods of Data Analysis (2nd ed), Duxbury.
Heggestad, H.E. and Lesser, V.M. (1990). Effects of Chronic Doses of Sulfur Dioxide, Ozone, and Drought on Yields and Growth of Soybeans Under Field Conditions, Journal of Environmental Quality 19: 488–495.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | str(case1402)
plot(Forrest ~ O3, case1402, log="y", pch=ifelse(Stress=="Stressed",19,21))
plot(Forrest ~ SO2, case1402, log="y", pch=ifelse(Stress=="Stressed",19,21))
fitbig <- lm(log(Forrest) ~ O3*SO2*Stress, case1402)
# Residual plot does not indicate any problem.
plot(fitbig)
# The 3-factor interaction is not statistically significant.
anova(fitbig)
# Drop the three-factor interaction
fit2 <- update(fitbig, ~ . - O3:SO2:Stress)
anova(fit2)
fitadditive <- lm(log(Forrest) ~ O3 + SO2 + Stress, case1402)
summary(fitadditive)
|
'data.frame': 30 obs. of 5 variables:
$ Stress : Factor w/ 2 levels "Well-watered",..: 1 1 1 1 1 1 1 1 1 1 ...
$ SO2 : num 0.0045 0.0045 0.0045 0.0045 0.0045 ...
$ O3 : num 0.017 0.049 0.067 0.084 0.099 ...
$ Forrest: num 4376 4544 2806 3339 3320 ...
$ William: num 5561 5947 4273 3470 3080 ...
Analysis of Variance Table
Response: log(Forrest)
Df Sum Sq Mean Sq F value Pr(>F)
O3 1 0.72077 0.72077 32.5434 9.747e-06 ***
SO2 1 0.05697 0.05697 2.5723 0.1230
Stress 1 0.00804 0.00804 0.3629 0.5531
O3:SO2 1 0.01635 0.01635 0.7381 0.3995
O3:Stress 1 0.01363 0.01363 0.6154 0.4411
SO2:Stress 1 0.00854 0.00854 0.3858 0.5409
O3:SO2:Stress 1 0.02971 0.02971 1.3413 0.2592
Residuals 22 0.48726 0.02215
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Analysis of Variance Table
Response: log(Forrest)
Df Sum Sq Mean Sq F value Pr(>F)
O3 1 0.72077 0.72077 32.0675 9.154e-06 ***
SO2 1 0.05697 0.05697 2.5347 0.1250
Stress 1 0.00804 0.00804 0.3576 0.5557
O3:SO2 1 0.01635 0.01635 0.7273 0.4026
O3:Stress 1 0.01363 0.01363 0.6064 0.4441
SO2:Stress 1 0.00854 0.00854 0.3802 0.5436
Residuals 23 0.51696 0.02248
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Call:
lm(formula = log(Forrest) ~ O3 + SO2 + Stress, data = case1402)
Residuals:
Min 1Q Median 3Q Max
-0.29138 -0.06418 0.00235 0.07715 0.30562
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 8.60354 0.07660 112.323 < 2e-16 ***
O3 -5.43631 0.93595 -5.808 4.04e-06 ***
SO2 -1.86946 1.14481 -1.633 0.115
StressStressed -0.03274 0.05337 -0.613 0.545
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.1462 on 26 degrees of freedom
Multiple R-squared: 0.5858, Adjusted R-squared: 0.5381
F-statistic: 12.26 on 3 and 26 DF, p-value: 3.461e-05
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.