Mill Abrasion

This data was provided by Mike. This is the process of my analyses.

First, I imported a dataframe I created that formatted the data in a way I could graph it

mill.abrasion <- read.csv("~/Documents/R/mill abrasion.csv")
head(mill.abrasion)
##   lab    A   B   C   D   E   F
## 1   1 2.70 3.4 3.8 3.3 7.1 4.4
## 2   1 2.80 3.3 4.1 3.8 6.4 4.3
## 3   1 2.50 3.2 4.4 3.8 6.7 4.4
## 4   1 3.40 3.0 4.2 3.5 7.2 4.0
## 5   1 2.55 3.2 4.1 3.8 6.2 4.2
## 6   2 3.70 3.4 3.9 3.5 6.5 4.4

From there, I made 6 different boxplots (one for each rock), that compared the abraded materials produced from each lab

boxplot(mill.abrasion$A ~ mill.abrasion$lab, main = "Rock A", xlab = "Lab", 
    ylab = "Ballast Materials", ylim = c(2, 9))

plot of chunk unnamed-chunk-2

boxplot(mill.abrasion$B ~ mill.abrasion$lab, main = "Rock B", xlab = "Lab", 
    ylab = "Ballast Materials", ylim = c(2, 9))

plot of chunk unnamed-chunk-2

boxplot(mill.abrasion$C ~ mill.abrasion$lab, main = "Rock C", xlab = "Lab", 
    ylab = "Ballast Materials", ylim = c(2, 9))

plot of chunk unnamed-chunk-2

boxplot(mill.abrasion$D ~ mill.abrasion$lab, main = "Rock D", xlab = "Lab", 
    ylab = "Ballast Materials", ylim = c(2, 9))

plot of chunk unnamed-chunk-2

boxplot(mill.abrasion$E ~ mill.abrasion$lab, main = "Rock E", xlab = "Lab", 
    ylab = "Ballast Materials", ylim = c(2, 9))

plot of chunk unnamed-chunk-2

boxplot(mill.abrasion$F ~ mill.abrasion$lab, main = "Rock F", xlab = "Lab", 
    ylab = "Ballast Materials", ylim = c(2, 9))

plot of chunk unnamed-chunk-2

Then I combined all plots into one plot, so that they could be easily compared

allplots <- par(mfrow = c(2, 3))
boxplot(mill.abrasion$A ~ mill.abrasion$lab, main = "Rock A", xlab = "Lab", 
    ylab = "Ballast Materials", ylim = c(2, 9))
boxplot(mill.abrasion$B ~ mill.abrasion$lab, main = "Rock B", xlab = "Lab", 
    ylab = "Ballast Materials", ylim = c(2, 9))
boxplot(mill.abrasion$C ~ mill.abrasion$lab, main = "Rock C", xlab = "Lab", 
    ylab = "Ballast Materials", ylim = c(2, 9))
boxplot(mill.abrasion$D ~ mill.abrasion$lab, main = "Rock D", xlab = "Lab", 
    ylab = "Ballast Materials", ylim = c(2, 9))
boxplot(mill.abrasion$E ~ mill.abrasion$lab, main = "Rock E", xlab = "Lab", 
    ylab = "Ballast Materials", ylim = c(2, 9))
boxplot(mill.abrasion$F ~ mill.abrasion$lab, main = "Rock F", xlab = "Lab", 
    ylab = "Ballast Materials", ylim = c(2, 9))

plot of chunk unnamed-chunk-3

par(allplots)

Next, to do statistical analyses on the data, I imported the dataframe that Mike created

ABRASION <- read.csv("~/Downloads/ABRASION.CSV")
head(ABRASION)
##   lab quarry abraded
## 1   1      1    2.70
## 2   1      1    2.80
## 3   1      1    2.50
## 4   1      1    3.40
## 5   1      1    2.55
## 6   2      1    3.70
attach(ABRASION)

The first anova I ran looked at the the effect of what lab was used and the quarry the rock was from on the variability on abraded material

(anova(lm(abraded ~ lab + quarry)))
## Analysis of Variance Table
## 
## Response: abraded
##            Df Sum Sq Mean Sq F value Pr(>F)    
## lab         1    0.1     0.1    0.04   0.84    
## quarry      1  133.6   133.6  108.46 <2e-16 ***
## Residuals 207  255.0     1.2                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

This anova showed that the quarry was a very significant factor in the variability of the abraded material

The second anova I ran looked at the effect of the lab used, the quarry the rock was from, and the interaction of the two on the variability of the abraded material

(anova(lm(abraded ~ lab + quarry + lab * quarry)))
## Analysis of Variance Table
## 
## Response: abraded
##             Df Sum Sq Mean Sq F value Pr(>F)    
## lab          1    0.1     0.1    0.04   0.84    
## quarry       1  133.6   133.6  107.97 <2e-16 ***
## lab:quarry   1    0.1     0.1    0.07   0.79    
## Residuals  206  254.9     1.2                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

This anova again showed that the quarry was a very significant factor in the variability of the abraded material