tri0 <- read.csv(pathtofile) # replace pathtofile
a <- tri0$a
b <- tri0$b
c <- tri0$c
d <- sqrt(((a - b)^2 + (b - c)^2 + (a - c)^2 ) / (3*(a^2 + b^2 + c^2)))
tri <- data.frame(d,
F1 = as.factor(ifelse(tri0$F1=="threesided","thr","tri")),
F2 = as.factor(tri0$F2))
triSTAT 516 hw 6
Thirty sheets of paper were printed, each with one of the following instructions printed on top, such that each instruction appeared on five sheets of paper:
- “Draw a triangle”
- “Draw any triangle”
- “Draw literally any triangle”
- “Draw a three-sided shape”
- “Draw any three-sided shape”
- “Draw literally any three-sided shape”
The sheets of paper were stacked such that the instructions were inserted in the above order, cyclically, five times in the stack, and the sheets were handed out one-by-one to students in a class, such that the desk at which a student sat determined which instruction he or she was given. After following the instructions, the students were asked to measure the lengths of the sides (
The data are in the file triangle_threesided_shape_draw.csv, which can be downloaded from this folder. The R code below will prepare the data for analysis: It will compute on each set of side lengths the value
Consider fitting the two-way treatment effects model which assumes the responses arise as
1.
What are the two factors in the experiment and how many levels does each have?
2.
Make side-by-side boxplots of the responses at all factor level combinations.
3.
Give the output of table(tri$F1,tri$F2) and explain what it shows.
4.
Give the means of the responses at all factor level combinations.
5.
Give
6.
Check whether the assumptions of the two-way ANOVA model are satisfied.
7.
Give the value of the test statistic for the overall
8.
Obtain the complete ANOVA table containing the
9.
Generate interaction plots for the two factors. State whether you believe there is an interaction between the two factors.
10.
State whether you believe there is a significant main effect associated with any of the two factors.
11.
Use Dunnett’s method to compare the means at all factor level combinations to that of the “Draw a triangle” group. Report the confidence intervals for the differences in means and interpret them.