Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > d <- data.frame(Factor1 = c(rep("A", 10), rep("B", 10), rep("C", 10)),
- +
- + Factor2 = c(rep("D", 8), rep("E", 6), rep("F", 16)),
- +
- + Factor3 = c(rep("1", 15), rep("2", 15)),
- +
- + Response = c(1:30))
- >
- > summary.lm(lm(Response ~ Factor1 + Factor2 + Factor3,
- +
- + data = d,
- +
- + contrasts = list(Factor1 = contr.poly)))
- Call:
- lm(formula = Response ~ Factor1 + Factor2 + Factor3, data = d,
- contrasts = list(Factor1 = contr.poly))
- Residuals:
- Min 1Q Median 3Q Max
- -4.5 -1.5 0.0 1.5 4.5
- Coefficients:
- Estimate Std. Error t value Pr(>|t|)
- (Intercept) 9.000 1.694 5.314 1.88e-05 ***
- Factor1.L 7.425 1.750 4.243 0.000285 ***
- Factor1.Q 1.837 1.010 1.818 0.081526 .
- Factor2E 5.000 1.909 2.619 0.015056 *
- Factor2F 7.500 3.307 2.268 0.032627 *
- Factor32 3.000 2.646 1.134 0.268039
- ---
- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
- Residual standard error: 2.415 on 24 degrees of freedom
- Multiple R-squared: 0.9377, Adjusted R-squared: 0.9247
- F-statistic: 72.26 on 5 and 24 DF, p-value: 1.133e-13
- >
- > Anova(lm(Response ~ Factor1 + Factor2 + Factor3,
- +
- + data = d,
- +
- + contrasts = list(Factor1 = contr.poly)),
- +
- + type="II")
- Anova Table (Type II tests)
- Response: Response
- Sum Sq Df F value Pr(>F)
- Factor1 199.5 2 17.1000 2.418e-05 ***
- Factor2 45.0 2 3.8571 0.03528 *
- Factor3 7.5 1 1.2857 0.26804
- Residuals 140.0 24
- ---
- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement