setwd("C:/Users/lhomm/OneDrive/Documents/R")
Dat <- read.table ("http://users.stat.ufl.edu/~rrandles/sta4210/Rclassnotes/data/textdatasets/KutnerData/Chapter%2024%20Data%20Sets/CH24PR09.txt")
colnames (Dat) <-  c("Work", "Fee", "Scope", "Supervision")
attach(Dat)
Fee <- factor(Dat$Fee)
levels(Fee) <- c("High", "Med", "Low")
Scope <- factor (Dat$Scope)
levels(Scope) <- c("In", "Out")
Supervision <- factor(Dat$Supervision)
levels(Supervision) <- c("Local", "Travel")
library(DescTools)
interaction.plot(Fee[Supervision == "Local"], Scope[Supervision ==
"Local"], Work[Supervision == "Local"], ylim = c(55, 130),
xlab = "Feel", ylab = "Work Index", main = "Supervision: Local")

interaction.plot(Fee[Supervision == "Travel"], Scope[Supervision ==
"Travel"], Work[Supervision == "Travel"], ylim = c(55,
130), xlab = "Fee", ylab = "Work Index", main = "Supervision: Travel")

### For supervision: local it sppears that the lines parallel. While they don't overlap they are very close. So while we can definitivly say that for supervision: local we can safely and definitivly say that Fee has a main effect we can only tennetivly say the same for scope; we need more information.###

### For supervision: travel the two lines are parallel but far from overlapping so we can say with more assurance that both factors fee and scope have main effects. ###

### There may be evidence of an interaction between scope and supervision. ###
interaction.plot(Fee[Scope == "In"], Supervision[Scope ==
"In"], Work[Scope == "In"], ylim = c(55, 130),
xlab = "Fee", ylab = "Work Index", main = "Scope: In")

interaction.plot(Fee[Scope == "Out"], Supervision[Scope ==
"Out"], Work[Scope == "Out"], ylim = c(55,
130), xlab = "Fee", ylab = "Work Index", main = "Scope: Out")

### For scope: in its clear that fee has a main effect it is a little less clear that scope also does but I am leaning towards saying that it does have a main effect as the two lines are close but still not overlappint. ###

### For scope: out it seems as though both factors have main effects. ###

### There me be an interaction between scope and interaction. ###
Anova1 <- aov (Work ~ Fee*Scope*Supervision)
Anova1
## Call:
##    aov(formula = Work ~ Fee * Scope * Supervision)
## 
## Terms:
##                       Fee     Scope Supervision Fee:Scope Fee:Supervision
## Sum of Squares  10044.271  1833.977    3832.400     1.601           0.788
## Deg. of Freedom         2         1           1         2               2
##                 Scope:Supervision Fee:Scope:Supervision Residuals
## Sum of Squares            574.775                 3.943   266.138
## Deg. of Freedom                 1                     2        36
## 
## Residual standard error: 2.718954
## Estimated effects may be unbalanced
Anova2 <- anova(lm(Work ~ Fee + Scope + Supervision + Fee*Scope + Fee*Supervision + Scope*Supervision + Fee*Scope*Supervision))
Anova2
## Analysis of Variance Table
## 
## Response: Work
##                       Df  Sum Sq Mean Sq  F value    Pr(>F)    
## Fee                    2 10044.3  5022.1 679.3364 < 2.2e-16 ***
## Scope                  1  1834.0  1834.0 248.0792 < 2.2e-16 ***
## Supervision            1  3832.4  3832.4 518.4027 < 2.2e-16 ***
## Fee:Scope              2     1.6     0.8   0.1083    0.8977    
## Fee:Supervision        2     0.8     0.4   0.0533    0.9482    
## Scope:Supervision      1   574.8   574.8  77.7489 1.602e-10 ***
## Fee:Scope:Supervision  2     3.9     2.0   0.2667    0.7674    
## Residuals             36   266.1     7.4                       
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Anova1)
##                       Df Sum Sq Mean Sq F value  Pr(>F)    
## Fee                    2  10044    5022 679.336 < 2e-16 ***
## Scope                  1   1834    1834 248.079 < 2e-16 ***
## Supervision            1   3832    3832 518.403 < 2e-16 ***
## Fee:Scope              2      2       1   0.108   0.898    
## Fee:Supervision        2      1       0   0.053   0.948    
## Scope:Supervision      1    575     575  77.749 1.6e-10 ***
## Fee:Scope:Supervision  2      4       2   0.267   0.767    
## Residuals             36    266       7                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
### H0: i, j, k: Alpha*Beta*Gamma_i_j_k = 0 H1: At least one Alpha*Beta*Gamma does not equal 0 ###
Decsion_Rule <- qf(0.01, 2, 36, lower.tail=FALSE) ### Decision Rule ###
Decsion_Rule
## [1] 5.247894
summary(Anova1)
##                       Df Sum Sq Mean Sq F value  Pr(>F)    
## Fee                    2  10044    5022 679.336 < 2e-16 ***
## Scope                  1   1834    1834 248.079 < 2e-16 ***
## Supervision            1   3832    3832 518.403 < 2e-16 ***
## Fee:Scope              2      2       1   0.108   0.898    
## Fee:Supervision        2      1       0   0.053   0.948    
## Scope:Supervision      1    575     575  77.749 1.6e-10 ***
## Fee:Scope:Supervision  2      4       2   0.267   0.767    
## Residuals             36    266       7                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
### With an F-value of .7674 ~ .767 being much smaller than our decision rule we don't have enough evidence for three way interaction so we reject HO. The P-value above .1/.05/.01 gives extra weight to our conclusions. ### 
### Hypthesis ###
### H0: i, j: Alpha*Beta_i_j = 0 H1: At least one Alpha*beta_i_j does not equal 0 ###

### H0: i, k,: Alpha*Gamma_i_k = 0 H1: At least one Alpha*Gamma_i_k does not equal 0 ###

### H0: j, k,: Beta*Gamma_j_k = 0 H1: At least one Beta*Gamma_j_k does not equal 0 ###

### Decision Rules ###
Decsion_Rule <- qf(0.01, 2, 36, lower.tail=FALSE) ### Decision Rule ###
Decsion_Rule
## [1] 5.247894
Decsion_Rule <- qf(0.01, 2, 36, lower.tail=FALSE) ### Decision Rule ###
Decsion_Rule
## [1] 5.247894
Decsion_Rule <- qf(0.01, 1, 36, lower.tail=FALSE) ### Decision Rule ###
Decsion_Rule
## [1] 7.395597
### Modles ###
Anova5 <- aov (Work ~ Fee*Scope)
Anova5
## Call:
##    aov(formula = Work ~ Fee * Scope)
## 
## Terms:
##                       Fee     Scope Fee:Scope Residuals
## Sum of Squares  10044.271  1833.977     1.601  4678.044
## Deg. of Freedom         2         1         2        42
## 
## Residual standard error: 10.55377
## Estimated effects may be unbalanced
Anova6 <- anova(lm(Work ~ Fee + Scope + Fee*Scope))
Anova6
## Analysis of Variance Table
## 
## Response: Work
##           Df  Sum Sq Mean Sq F value    Pr(>F)    
## Fee        2 10044.3  5022.1 45.0893 3.498e-11 ***
## Scope      1  1834.0  1834.0 16.4656 0.0002108 ***
## Fee:Scope  2     1.6     0.8  0.0072 0.9928389    
## Residuals 42  4678.0   111.4                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Anova5)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## Fee          2  10044    5022  45.089  3.5e-11 ***
## Scope        1   1834    1834  16.466 0.000211 ***
## Fee:Scope    2      2       1   0.007 0.992839    
## Residuals   42   4678     111                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Anova7 <- aov (Work ~ Fee*Supervision)
Anova7
## Call:
##    aov(formula = Work ~ Fee * Supervision)
## 
## Terms:
##                       Fee Supervision Fee:Supervision Residuals
## Sum of Squares  10044.271    3832.400           0.788  2680.434
## Deg. of Freedom         2           1               2        42
## 
## Residual standard error: 7.988733
## Estimated effects may be unbalanced
Anova8 <- anova(lm(Work ~ Fee + Scope + Fee*Supervision))
Anova8
## Analysis of Variance Table
## 
## Response: Work
##                 Df  Sum Sq Mean Sq  F value    Pr(>F)    
## Fee              2 10044.3  5022.1 243.2582 < 2.2e-16 ***
## Scope            1  1834.0  1834.0  88.8327 8.099e-12 ***
## Supervision      1  3832.4  3832.4 185.6307 < 2.2e-16 ***
## Fee:Supervision  2     0.8     0.4   0.0191    0.9811    
## Residuals       41   846.5    20.6                       
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Anova7)
##                 Df Sum Sq Mean Sq F value   Pr(>F)    
## Fee              2  10044    5022  78.692 6.23e-15 ***
## Supervision      1   3832    3832  60.050 1.26e-09 ***
## Fee:Supervision  2      1       0   0.006    0.994    
## Residuals       42   2680      64                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Anova9 <- aov (Work ~ Scope*Supervision)
Anova9
## Call:
##    aov(formula = Work ~ Scope * Supervision)
## 
## Terms:
##                     Scope Supervision Scope:Supervision Residuals
## Sum of Squares   1833.977    3832.400           574.775 10316.741
## Deg. of Freedom         1           1                 1        44
## 
## Residual standard error: 15.31246
## Estimated effects may be unbalanced
Anova10 <- anova(lm(Work ~ Scope + Supervision + Scope*Supervision))
Anova10
## Analysis of Variance Table
## 
## Response: Work
##                   Df  Sum Sq Mean Sq F value    Pr(>F)    
## Scope              1  1834.0  1834.0  7.8218 0.0076268 ** 
## Supervision        1  3832.4  3832.4 16.3449 0.0002093 ***
## Scope:Supervision  1   574.8   574.8  2.4514 0.1245872    
## Residuals         44 10316.7   234.5                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Anova9)
##                   Df Sum Sq Mean Sq F value   Pr(>F)    
## Scope              1   1834    1834   7.822 0.007627 ** 
## Supervision        1   3832    3832  16.345 0.000209 ***
## Scope:Supervision  1    575     575   2.451 0.124587    
## Residuals         44  10317     234                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
### Conclusions###
### For the model with the only two way interaction being Fee*scope the P-value was larger than .1/.05/.01 and the F-value was smaller than the decision rule. ###

### For the model with Fee*Supervision as the only two way ineraction the P-value was smaller than .1/.05/.01 and the F-value was larger than the decision rule. ###

### For the model with the only two way ineraction being Scope*Supervision the p-value is smaller than .1/.05/.01 and the F-value is larger than the decision rule. ###

### It appears that there is no signifigant interaction between fee and scope but there is signifigant interaction between fee and scope and scope and supervision. ####

### We will now check combinations of two way interactions. ###

### Models ###
Anova3 <- aov (Work ~ Fee*Scope*Supervision)
Anova3
## Call:
##    aov(formula = Work ~ Fee * Scope * Supervision)
## 
## Terms:
##                       Fee     Scope Supervision Fee:Scope Fee:Supervision
## Sum of Squares  10044.271  1833.977    3832.400     1.601           0.788
## Deg. of Freedom         2         1           1         2               2
##                 Scope:Supervision Fee:Scope:Supervision Residuals
## Sum of Squares            574.775                 3.943   266.138
## Deg. of Freedom                 1                     2        36
## 
## Residual standard error: 2.718954
## Estimated effects may be unbalanced
Anova4 <- anova(lm(Work ~ Fee + Scope + Supervision + Fee*Scope + Fee*Supervision + Scope*Supervision))
Anova4
## Analysis of Variance Table
## 
## Response: Work
##                   Df  Sum Sq Mean Sq  F value    Pr(>F)    
## Fee                2 10044.3  5022.1 706.6086 < 2.2e-16 ***
## Scope              1  1834.0  1834.0 258.0384 < 2.2e-16 ***
## Supervision        1  3832.4  3832.4 539.2142 < 2.2e-16 ***
## Fee:Scope          2     1.6     0.8   0.1126    0.8938    
## Fee:Supervision    2     0.8     0.4   0.0554    0.9462    
## Scope:Supervision  1   574.8   574.8  80.8702 5.989e-11 ***
## Residuals         38   270.1     7.1                       
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Anova3)
##                       Df Sum Sq Mean Sq F value  Pr(>F)    
## Fee                    2  10044    5022 679.336 < 2e-16 ***
## Scope                  1   1834    1834 248.079 < 2e-16 ***
## Supervision            1   3832    3832 518.403 < 2e-16 ***
## Fee:Scope              2      2       1   0.108   0.898    
## Fee:Supervision        2      1       0   0.053   0.948    
## Scope:Supervision      1    575     575  77.749 1.6e-10 ***
## Fee:Scope:Supervision  2      4       2   0.267   0.767    
## Residuals             36    266       7                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Anova11 <- aov (Work ~ Fee*Scope + Fee*Supervision)
Anova11
## Call:
##    aov(formula = Work ~ Fee * Scope + Fee * Supervision)
## 
## Terms:
##                       Fee     Scope Supervision Fee:Scope Fee:Supervision
## Sum of Squares  10044.271  1833.977    3832.400     1.601           0.788
## Deg. of Freedom         2         1           1         2               2
##                 Residuals
## Sum of Squares    844.856
## Deg. of Freedom        39
## 
## Residual standard error: 4.654349
## Estimated effects may be unbalanced
Anova12 <- anova(lm(Work ~ Fee + Scope + Supervision + Fee*Scope + Fee*Supervision))
Anova12
## Analysis of Variance Table
## 
## Response: Work
##                 Df  Sum Sq Mean Sq  F value    Pr(>F)    
## Fee              2 10044.3  5022.1 231.8305 < 2.2e-16 ***
## Scope            1  1834.0  1834.0  84.6596 2.561e-11 ***
## Supervision      1  3832.4  3832.4 176.9102 4.488e-16 ***
## Fee:Scope        2     1.6     0.8   0.0370    0.9638    
## Fee:Supervision  2     0.8     0.4   0.0182    0.9820    
## Residuals       39   844.9    21.7                       
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Anova11)
##                 Df Sum Sq Mean Sq F value   Pr(>F)    
## Fee              2  10044    5022 231.830  < 2e-16 ***
## Scope            1   1834    1834  84.660 2.56e-11 ***
## Supervision      1   3832    3832 176.910 4.49e-16 ***
## Fee:Scope        2      2       1   0.037    0.964    
## Fee:Supervision  2      1       0   0.018    0.982    
## Residuals       39    845      22                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Anova13 <- aov (Work ~ Fee*Scope + Scope*Supervision)
Anova13
## Call:
##    aov(formula = Work ~ Fee * Scope + Scope * Supervision)
## 
## Terms:
##                       Fee     Scope Supervision Fee:Scope Scope:Supervision
## Sum of Squares  10044.271  1833.977    3832.400     1.601           574.775
## Deg. of Freedom         2         1           1         2                 1
##                 Residuals
## Sum of Squares    270.868
## Deg. of Freedom        40
## 
## Residual standard error: 2.602251
## Estimated effects may be unbalanced
Anova14 <- anova(lm(Work ~ Fee + Scope + Supervision + Fee*Scope + Scope*Supervision))
Anova14
## Analysis of Variance Table
## 
## Response: Work
##                   Df  Sum Sq Mean Sq  F value    Pr(>F)    
## Fee                2 10044.3  5022.1 741.6350 < 2.2e-16 ***
## Scope              1  1834.0  1834.0 270.8293 < 2.2e-16 ***
## Supervision        1  3832.4  3832.4 565.9429 < 2.2e-16 ***
## Fee:Scope          2     1.6     0.8   0.1182    0.8888    
## Scope:Supervision  1   574.8   574.8  84.8789 1.944e-11 ***
## Residuals         40   270.9     6.8                       
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Anova13)
##                   Df Sum Sq Mean Sq F value   Pr(>F)    
## Fee                2  10044    5022 741.635  < 2e-16 ***
## Scope              1   1834    1834 270.829  < 2e-16 ***
## Supervision        1   3832    3832 565.943  < 2e-16 ***
## Fee:Scope          2      2       1   0.118    0.889    
## Scope:Supervision  1    575     575  84.879 1.94e-11 ***
## Residuals         40    271       7                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Anova15 <- aov (Work ~ Fee*Supervision + Scope*Supervision)
Anova15
## Call:
##    aov(formula = Work ~ Fee * Supervision + Scope * Supervision)
## 
## Terms:
##                       Fee Supervision     Scope Fee:Supervision
## Sum of Squares  10044.271    3832.400  1833.977           0.788
## Deg. of Freedom         2           1         1               2
##                 Supervision:Scope Residuals
## Sum of Squares            574.775   271.682
## Deg. of Freedom                 1        40
## 
## Residual standard error: 2.606155
## Estimated effects may be unbalanced
Anova16 <- anova(lm(Work ~ Fee + Scope + Supervision + Fee*Supervision + Scope*Supervision))
Anova16
## Analysis of Variance Table
## 
## Response: Work
##                   Df  Sum Sq Mean Sq F value    Pr(>F)    
## Fee                2 10044.3  5022.1 739.415 < 2.2e-16 ***
## Scope              1  1834.0  1834.0 270.019 < 2.2e-16 ***
## Supervision        1  3832.4  3832.4 564.249 < 2.2e-16 ***
## Fee:Supervision    2     0.8     0.4   0.058    0.9437    
## Scope:Supervision  1   574.8   574.8  84.625 2.026e-11 ***
## Residuals         40   271.7     6.8                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Anova15)
##                   Df Sum Sq Mean Sq F value   Pr(>F)    
## Fee                2  10044    5022 739.415  < 2e-16 ***
## Supervision        1   3832    3832 564.249  < 2e-16 ***
## Scope              1   1834    1834 270.018  < 2e-16 ***
## Fee:Supervision    2      1       0   0.058    0.944    
## Supervision:Scope  1    575     575  84.625 2.03e-11 ***
## Residuals         40    272       7                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
### For the model with all two way For the model with all two way ineractions only scope*Supervision had a P-value smaller than .1/.05/.01 and a large enough F-value. ###

### For the model with Fee*Scope and Fee*Supervision both had P-values smaller than .1/.05/.01 and F-values that were too small. ###

### For the model with Fee*Scope and Scope*Supervision only scope*Supervision had a P-value smaller than .1/.05/.01 and a large enough F-value. ###

### For the model with Fee*Supervision and Scope*Supervision only only scope*Supervision had a P-value smaller than .1/.05/.01 and a large enough F-value. ###

### It seems the only signifigant interaction is Scope*Supervision, ###
### Yes the results are consitent with the graphical representations. ###
Anova17 <- aov (Work ~ Fee + Scope*Supervision)
Anova17
## Call:
##    aov(formula = Work ~ Fee + Scope * Supervision)
## 
## Terms:
##                       Fee     Scope Supervision Scope:Supervision Residuals
## Sum of Squares  10044.271  1833.977    3832.400           574.775   272.470
## Deg. of Freedom         2         1           1                 1        42
## 
## Residual standard error: 2.547032
## Estimated effects may be unbalanced
Anova18 <- anova(lm(Work ~ Fee + Scope + Supervision + Scope*Supervision))
Anova18
## Analysis of Variance Table
## 
## Response: Work
##                   Df  Sum Sq Mean Sq F value    Pr(>F)    
## Fee                2 10044.3  5022.1 774.140 < 2.2e-16 ***
## Scope              1  1834.0  1834.0 282.700 < 2.2e-16 ***
## Supervision        1  3832.4  3832.4 590.748 < 2.2e-16 ***
## Scope:Supervision  1   574.8   574.8  88.599 6.621e-12 ***
## Residuals         42   272.5     6.5                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(Anova17)
##                   Df Sum Sq Mean Sq F value   Pr(>F)    
## Fee                2  10044    5022   774.1  < 2e-16 ***
## Scope              1   1834    1834   282.7  < 2e-16 ***
## Supervision        1   3832    3832   590.7  < 2e-16 ***
## Scope:Supervision  1    575     575    88.6 6.62e-12 ***
## Residuals         42    272       6                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
t1 <- qt(1- (.1/12), 36)
t1
## [1] 2.51104
means <- c(122.38125, 111.43125, 116.93958, 92.14792, 121.41875,
110.46875, 115.97708, 91.18542, 91.225, 80.275, 85.78333,
60.99167)

c1 <- c(1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0)
c2 <- c(0, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0)
c3 <- c(1, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0)
c4 <- c(1/3, -1/3, 0, 0, 1/3, -1/3, 0, 0, 1/3, -1/3, 0, 0)
c5 <- c(0, 0, 1/3, -1/3, 0, 0, 1/3, -1/3, 0, 0, 1/3, -1/3)
c6 <- c(1/3, -1/3, -1/3, 1/3, 1/3, -1/3, -1/3, 1/3, 1/3, -1/3,
-1/3, 1/3)

MSE <- sum(((Anova17$residuals) ^ 2) / Anova17$df.residual)


A <- 3
B <- 2
C <- 2
n <- 48

### Mean1.. - Mean2.. = (0.58, 1.345) ###
### Mean2.. - Mean3.. = (29.8, 30.6) ###
### Mean1.. - Mean3.. = (30.8, 31.5) ###
### Mean.11 - Mean.12 = (10.7, 11.2) ###
### Mean.21 _ Mean.22 = (24.5, 24) ###
### Mean.11 - Mean.12 - Mean.21  + Mean.22 = (-14.46 , -13.23) ###
c7 <- c(0, 0, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0)
t2 <- qt(.975, 36)
Interval <-sum(c7 * means) + c(-1, 1) * t2 * sqrt(MSE/n * sum(c7 * c7))
Interval
## [1] -0.09192775  2.01692775
Tukey1 <- TukeyHSD(Anova1, which = "Scope:Supervision", conf.level = .9)
Tukey1
##   Tukey multiple comparisons of means
##     90% family-wise confidence level
## 
## Fit: aov(formula = Work ~ Fee * Scope * Supervision)
## 
## $`Scope:Supervision`
##                            diff        lwr        upr     p adj
## Out:Local-In:Local    -5.441667  -8.079514  -2.803819 0.0001151
## In:Travel-In:Local   -10.950000 -13.587847  -8.312153 0.0000000
## Out:Travel-In:Local  -30.233333 -32.871181 -27.595486 0.0000000
## In:Travel-Out:Local   -5.508333  -8.146181  -2.870486 0.0000960
## Out:Travel-Out:Local -24.791667 -27.429514 -22.153819 0.0000000
## Out:Travel-In:Travel -19.283333 -21.921181 -16.645486 0.0000000
### All of the contrasts are significant. In are better than out. Local is also better. High fee level is the best of the three fee levels. So the best option is one with local supervision, in house, and has a high fee. ###