Analysis of the metal ion concentrations

Boxplots

plot of chunk fig plot of chunk fig plot of chunk fig plot of chunk fig

You probably don't need to log transform. The patterns are really clear and the general pattern is not too right skewed, although there are some exceptions.

Overall two way ANOVAs

mod <- aov(Cadmium ~ Site * Source, data = d)
print(xtable(anova(mod), caption = "Cadmium"), "HTML")
Cadmium
Df Sum Sq Mean Sq F value Pr(> F)
Site 3 2.45 0.82 1.06 0.3650
Source 2 146.11 73.05 95.09 0.0000
Site:Source 6 7.80 1.30 1.69 0.1232
Residuals 264 202.82 0.77
mod <- aov(Copper ~ Site * Source, data = d)
print(xtable(anova(mod), caption = "Copper"), "HTML")
Copper
Df Sum Sq Mean Sq F value Pr(> F)
Site 3 513417.75 171139.25 17.65 0.0000
Source 2 9735167.40 4867583.70 502.07 0.0000
Site:Source 6 636090.56 106015.09 10.94 0.0000
Residuals 264 2559463.18 9694.94
mod <- aov(Zinc ~ Site * Source, data = d)
print(xtable(anova(mod), caption = "Zinc"), "HTML")
Zinc
Df Sum Sq Mean Sq F value Pr(> F)
Site 3 7104946.32 2368315.44 10.81 0.0000
Source 2 234583073.22 117291536.61 535.32 0.0000
Site:Source 6 8477380.48 1412896.75 6.45 0.0000
Residuals 252 55214264.95 219104.23
mod <- aov(Lead ~ Site * Source, data = d)
print(xtable(anova(mod), caption = "Lead"), "HTML")
Lead
Df Sum Sq Mean Sq F value Pr(> F)
Site 3 5365.46 1788.49 4.41 0.0048
Source 2 5906.63 2953.31 7.28 0.0008
Site:Source 6 6854.40 1142.40 2.82 0.0113
Residuals 260 105445.73 405.56

Combining sites and plotting confidence intervals

plot of chunk unnamed-chunk-3

## Analysis of Variance Table
## 
## Response: Cadmium
##            Df Sum Sq Mean Sq F value Pr(>F)    
## Source      2    146    73.1    93.6 <2e-16 ***
## Residuals 273    213     0.8                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Cadmium ~ Source, data = d)
## 
## $Source
##                  diff    lwr   upr p adj
## Mussel-Sediment 1.001 0.6054 1.397     0
## Oyster-Sediment 2.091 1.6954 2.487     0
## Oyster-Mussel   1.090 0.8212 1.359     0
## 

plot of chunk unnamed-chunk-3

## Analysis of Variance Table
## 
## Response: Copper
##            Df  Sum Sq Mean Sq F value Pr(>F)    
## Source      2 9735167 4867584     358 <2e-16 ***
## Residuals 273 3708971   13586                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Copper ~ Source, data = d)
## 
## $Source
##                   diff    lwr    upr  p adj
## Mussel-Sediment  11.84 -40.36  64.04 0.8544
## Oyster-Sediment 387.89 335.69 440.08 0.0000
## Oyster-Mussel   376.05 340.59 411.51 0.0000
## 

plot of chunk unnamed-chunk-3

## Analysis of Variance Table
## 
## Response: Lead
##            Df Sum Sq Mean Sq F value Pr(>F)   
## Source      2   6026    3013     6.9 0.0012 **
## Residuals 269 117546     437                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Lead ~ Source, data = d)
## 
## $Source
##                    diff     lwr    upr  p adj
## Mussel-Sediment   3.501  -5.861 12.863 0.6526
## Oyster-Sediment  -6.552 -15.952  2.847 0.2295
## Oyster-Mussel   -10.053 -16.468 -3.639 0.0008
## 

plot of chunk unnamed-chunk-3

## Analysis of Variance Table
## 
## Response: Zinc
##            Df   Sum Sq  Mean Sq F value Pr(>F)    
## Source      2 2.36e+08 1.18e+08     444 <2e-16 ***
## Residuals 261 6.93e+07 2.66e+05                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Zinc ~ Source, data = d)
## 
## $Source
##                    diff    lwr    upr  p adj
## Mussel-Sediment   87.51 -143.4  318.4 0.6449
## Oyster-Sediment 1989.64 1755.8 2223.5 0.0000
## Oyster-Mussel   1902.13 1741.0 2063.3 0.0000
## 

Oysters

plot of chunk unnamed-chunk-4

## Analysis of Variance Table
## 
## Response: Cadmium
##            Df Sum Sq Mean Sq F value Pr(>F)
## Site        3    2.0   0.652    1.09   0.36
## Residuals 116   69.6   0.600               
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Cadmium ~ Site, data = d1)
## 
## $Site
##                                diff     lwr    upr  p adj
## Epple Bay-Longrock          -0.3000 -0.8212 0.2212 0.4406
## Nayland Rock-Longrock       -0.3000 -0.8212 0.2212 0.4406
## Foreness Point-Longrock     -0.1167 -0.6379 0.4045 0.9369
## Nayland Rock-Epple Bay       0.0000 -0.5212 0.5212 1.0000
## Foreness Point-Epple Bay     0.1833 -0.3379 0.7045 0.7959
## Foreness Point-Nayland Rock  0.1833 -0.3379 0.7045 0.7959
## 

plot of chunk unnamed-chunk-4

## Analysis of Variance Table
## 
## Response: Copper
##            Df  Sum Sq Mean Sq F value  Pr(>F)    
## Site        3 1148876  382959    17.7 1.5e-09 ***
## Residuals 116 2504721   21592                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Copper ~ Site, data = d1)
## 
## $Site
##                                diff     lwr    upr  p adj
## Epple Bay-Longrock          -132.75 -231.65 -33.85 0.0037
## Nayland Rock-Longrock       -181.81 -280.71 -82.91 0.0000
## Foreness Point-Longrock       60.88  -38.02 159.78 0.3800
## Nayland Rock-Epple Bay       -49.06 -147.96  49.84 0.5692
## Foreness Point-Epple Bay     193.63   94.73 292.53 0.0000
## Foreness Point-Nayland Rock  242.69  143.79 341.59 0.0000
## 

plot of chunk unnamed-chunk-4

## Analysis of Variance Table
## 
## Response: Lead
##            Df Sum Sq Mean Sq F value Pr(>F)    
## Site        3   6.81   2.270    11.1  2e-06 ***
## Residuals 112  22.95   0.205                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Lead ~ Site, data = d1)
## 
## $Site
##                                 diff      lwr    upr  p adj
## Epple Bay-Longrock           0.57789  0.26512 0.8907 0.0000
## Nayland Rock-Longrock        0.40548  0.09271 0.7183 0.0054
## Foreness Point-Longrock      0.61726  0.30706 0.9275 0.0000
## Nayland Rock-Epple Bay      -0.17241 -0.48243 0.1376 0.4709
## Foreness Point-Epple Bay     0.03937 -0.26805 0.3468 0.9871
## Foreness Point-Nayland Rock  0.21178 -0.09564 0.5192 0.2804
## 

plot of chunk unnamed-chunk-4

## Analysis of Variance Table
## 
## Response: Zinc
##            Df   Sum Sq Mean Sq F value  Pr(>F)    
## Site        3 14098051 4699350    9.29 1.7e-05 ***
## Residuals 104 52630973  506067                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Zinc ~ Site, data = d1)
## 
## $Site
##                                diff    lwr    upr  p adj
## Epple Bay-Longrock          -200.74 -721.0  319.6 0.7454
## Nayland Rock-Longrock       -131.38 -642.5  379.7 0.9078
## Foreness Point-Longrock      687.16  180.2 1194.1 0.0033
## Nayland Rock-Epple Bay        69.37 -436.5  575.3 0.9842
## Foreness Point-Epple Bay     887.90  386.2 1389.6 0.0001
## Foreness Point-Nayland Rock  818.54  326.4 1310.7 0.0002
## 

Mussels

plot of chunk unnamed-chunk-5

## Analysis of Variance Table
## 
## Response: Cadmium
##            Df Sum Sq Mean Sq F value Pr(>F)  
## Site        3    8.3    2.76    2.41  0.071 .
## Residuals 116  133.0    1.15                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Cadmium ~ Site, data = d1)
## 
## $Site
##                                diff      lwr    upr  p adj
## Epple Bay-Longrock           0.6965 -0.02421 1.4172 0.0622
## Nayland Rock-Longrock        0.1349 -0.58577 0.8556 0.9616
## Foreness Point-Longrock      0.3410 -0.37971 1.0617 0.6070
## Nayland Rock-Epple Bay      -0.5616 -1.28227 0.1591 0.1826
## Foreness Point-Epple Bay    -0.3555 -1.07621 0.3652 0.5738
## Foreness Point-Nayland Rock  0.2061 -0.51464 0.9268 0.8785
## 

plot of chunk unnamed-chunk-5

## Analysis of Variance Table
## 
## Response: Copper
##            Df Sum Sq Mean Sq F value Pr(>F)
## Site        3    561     187     0.4   0.76
## Residuals 116  54602     471               
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Copper ~ Site, data = d1)
## 
## $Site
##                                diff    lwr    upr  p adj
## Epple Bay-Longrock          -2.3903 -16.99 12.212 0.9738
## Nayland Rock-Longrock       -6.0716 -20.67  8.531 0.7001
## Foreness Point-Longrock     -2.8598 -17.46 11.742 0.9564
## Nayland Rock-Epple Bay      -3.6813 -18.28 10.921 0.9128
## Foreness Point-Epple Bay    -0.4695 -15.07 14.133 0.9998
## Foreness Point-Nayland Rock  3.2118 -11.39 17.814 0.9398
## 

plot of chunk unnamed-chunk-5

## Analysis of Variance Table
## 
## Response: Lead
##            Df Sum Sq Mean Sq F value Pr(>F)   
## Site        3  11892    3964    4.38 0.0059 **
## Residuals 116 105070     906                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Lead ~ Site, data = d1)
## 
## $Site
##                                diff    lwr    upr  p adj
## Epple Bay-Longrock          -23.581 -43.84 -3.325 0.0155
## Nayland Rock-Longrock       -18.135 -38.39  2.121 0.0963
## Foreness Point-Longrock     -24.953 -45.21 -4.698 0.0092
## Nayland Rock-Epple Bay        5.446 -14.81 25.702 0.8966
## Foreness Point-Epple Bay     -1.372 -21.63 18.884 0.9980
## Foreness Point-Nayland Rock  -6.818 -27.07 13.438 0.8165
## 

plot of chunk unnamed-chunk-5

## Analysis of Variance Table
## 
## Response: Zinc
##            Df  Sum Sq Mean Sq F value Pr(>F)
## Site        3   23009    7670    0.34   0.79
## Residuals 116 2579350   22236               
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Zinc ~ Site, data = d1)
## 
## $Site
##                                diff    lwr   upr  p adj
## Epple Bay-Longrock           -8.771 -109.1 91.59 0.9958
## Nayland Rock-Longrock       -30.575 -130.9 69.79 0.8570
## Foreness Point-Longrock     -32.132 -132.5 68.23 0.8379
## Nayland Rock-Epple Bay      -21.804 -122.2 78.56 0.9419
## Foreness Point-Epple Bay    -23.361 -123.7 77.00 0.9297
## Foreness Point-Nayland Rock  -1.557 -101.9 98.80 1.0000
## 

Sediment

plot of chunk unnamed-chunk-6

## Analysis of Variance Table
## 
## Response: Cadmium
##           Df Sum Sq Mean Sq F value Pr(>F)
## Site       3 0.0147 0.00491    0.67   0.58
## Residuals 32 0.2355 0.00736               
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Cadmium ~ Site, data = d1)
## 
## $Site
##                                 diff      lwr     upr  p adj
## Epple Bay-Longrock          -0.01856 -0.12812 0.09101 0.9674
## Nayland Rock-Longrock       -0.05567 -0.16524 0.05390 0.5228
## Foreness Point-Longrock     -0.01856 -0.12812 0.09101 0.9674
## Nayland Rock-Epple Bay      -0.03711 -0.14668 0.07246 0.7956
## Foreness Point-Epple Bay     0.00000 -0.10957 0.10957 1.0000
## Foreness Point-Nayland Rock  0.03711 -0.07246 0.14668 0.7956
## 

plot of chunk unnamed-chunk-6

## Analysis of Variance Table
## 
## Response: Copper
##           Df Sum Sq Mean Sq F value Pr(>F)   
## Site       3   71.1   23.71    5.41  0.004 **
## Residuals 32  140.1    4.38                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Copper ~ Site, data = d1)
## 
## $Site
##                                diff    lwr      upr  p adj
## Epple Bay-Longrock          -0.1663 -2.839  2.50619 0.9983
## Nayland Rock-Longrock       -2.7962 -5.469 -0.12370 0.0375
## Foreness Point-Longrock     -2.9816 -5.654 -0.30903 0.0241
## Nayland Rock-Epple Bay      -2.6299 -5.302  0.04264 0.0551
## Foreness Point-Epple Bay    -2.8152 -5.488 -0.14270 0.0359
## Foreness Point-Nayland Rock -0.1853 -2.858  2.48719 0.9976
## 

plot of chunk unnamed-chunk-6

## Analysis of Variance Table
## 
## Response: Lead
##           Df Sum Sq Mean Sq F value Pr(>F)   
## Site       3    201      67    6.08 0.0022 **
## Residuals 32    353      11                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Lead ~ Site, data = d1)
## 
## $Site
##                               diff    lwr     upr  p adj
## Epple Bay-Longrock           1.796 -2.444  6.0367 0.6633
## Nayland Rock-Longrock       -3.796 -8.037  0.4443 0.0924
## Foreness Point-Longrock     -3.500 -7.741  0.7403 0.1351
## Nayland Rock-Epple Bay      -5.592 -9.833 -1.3520 0.0060
## Foreness Point-Epple Bay    -5.296 -9.537 -1.0560 0.0098
## Foreness Point-Nayland Rock  0.296 -3.944  4.5364 0.9975
## 

plot of chunk unnamed-chunk-6

## Analysis of Variance Table
## 
## Response: Zinc
##           Df Sum Sq Mean Sq F value Pr(>F)   
## Site       3   2238     746    6.06 0.0022 **
## Residuals 32   3942     123                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Zinc ~ Site, data = d1)
## 
## $Site
##                                 diff    lwr     upr  p adj
## Epple Bay-Longrock            2.6300 -11.55 16.8055 0.9579
## Nayland Rock-Longrock       -13.8888 -28.06  0.2868 0.0565
## Foreness Point-Longrock     -14.7777 -28.95 -0.6021 0.0384
## Nayland Rock-Epple Bay      -16.5188 -30.69 -2.3432 0.0173
## Foreness Point-Epple Bay    -17.4077 -31.58 -3.2321 0.0113
## Foreness Point-Nayland Rock  -0.8889 -15.06 13.2866 0.9982
##