Data set, statistical analyses, graphics and inference concerning effect of organic carbon in soil on dermal bioconcentration in amphibians. Analytes include active ingredients for commonly used pesticides (atrazine, imidacloprid, fipronil, triadimefon, pendimethalin).
This page is public at: http://rpubs.com/puruckertom/rvm2016
The git repo holding this code is available at: https://github.com/puruckertom/VanMeteretal2016_ple_v_ols
Version and installed libraries.
R.Version()$version.string
## [1] "R version 3.2.2 (2015-08-14)"
Sys.info()[4]
## nodename
## "DZ2626UTPURUCKE"
#check to see if needed packages are installed
list.of.packages <- c("ggplot2", "dplyr")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)
#load relevant packages
library(MASS)
library(dplyr, warn.conflicts = FALSE)
library(ggplot2)
Original file with analytical data: https://github.com/puruckertom/VanMeteretal2016_ple_v_ols/blob/master/RDATA.csv
##################
#the data sets
##################
#everything
frog.soil <- read.table(paste(frogsoildir,"RDATA.csv",sep=""), header = TRUE, sep = ",")
str(frog.soil)
## 'data.frame': 264 obs. of 11 variables:
## $ Day : int 2 2 2 2 2 2 2 2 2 2 ...
## $ Row : int 1 1 3 5 6 7 1 2 2 4 ...
## $ Column : Factor w/ 10 levels "","A","B","C",..: 2 9 4 4 7 3 3 7 10 3 ...
## $ Pesticide : Factor w/ 17 levels "ATZ","ATZDEA",..: 4 4 4 4 4 4 4 4 4 4 ...
## $ SoilType : Factor w/ 2 levels "OLS","PLE": 2 2 2 2 2 2 1 1 1 1 ...
## $ BodyBurden : num 0.337 1.227 0.701 0.367 0.352 ...
## $ Soil : num 22.9 39.6 19.1 16.6 28.5 ...
## $ Weight : num 13.18 15.87 8.39 14.54 16.43 ...
## $ Total : int 1 1 1 1 1 1 1 1 1 1 ...
## $ Formulation: int 0 0 0 0 0 0 0 0 0 0 ...
## $ Parent : int 1 1 1 1 1 1 1 1 1 1 ...
Modifying data set to create factors for ANOVA, calculate BCFs and amphibian surface areas.
frog.soil$bowlbcf <- frog.soil$BodyBurden/frog.soil$Soil
frog.soil$surface_area_total <- 1.131 * frog.soil$Weight^0.579
frog.soil$surface_area_footprint <- 0.425 * frog.soil$Weight^0.85
Structure of revised data set.
str(frog.soil)
## 'data.frame': 264 obs. of 14 variables:
## $ Day : Factor w/ 4 levels "0","1","2","3": 3 3 3 3 3 3 3 3 3 3 ...
## $ Row : Factor w/ 7 levels "1","2","3","4",..: 1 1 3 5 6 7 1 2 2 4 ...
## $ Column : Factor w/ 10 levels "","A","B","C",..: 2 9 4 4 7 3 3 7 10 3 ...
## $ Pesticide : Factor w/ 17 levels "ATZ","ATZDEA",..: 4 4 4 4 4 4 4 4 4 4 ...
## $ SoilType : Factor w/ 2 levels "OLS","PLE": 2 2 2 2 2 2 1 1 1 1 ...
## $ BodyBurden : num 0.337 1.227 0.701 0.367 0.352 ...
## $ Soil : num 22.9 39.6 19.1 16.6 28.5 ...
## $ Weight : num 13.18 15.87 8.39 14.54 16.43 ...
## $ Total : Factor w/ 2 levels "0","1": 2 2 2 2 2 2 2 2 2 2 ...
## $ Formulation : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
## $ Parent : Factor w/ 2 levels "0","1": 2 2 2 2 2 2 2 2 2 2 ...
## $ bowlbcf : num 0.0147 0.031 0.0367 0.0221 0.0124 ...
## $ surface_area_total : num 5.03 5.61 3.88 5.33 5.72 ...
## $ surface_area_footprint: num 3.81 4.46 2.59 4.14 4.59 ...
Add experimental and literature Koc data to data set.
unique(frog.soil$Pesticide)
## [1] ATZTOT ATZDEA STAUGDEA ATZDIA STAUGDIA ATZ Imid
## [8] FipTOT Fip FipS TNDTOT TDLA STRIKEA TDLB
## [15] STRIKEB TDN Pendi
## 17 Levels: ATZ ATZDEA ATZDIA ATZTOT Fip FipS FipTOT Imid ... TNDTOT
unique(frog.soil$SoilType)
## [1] PLE OLS
## Levels: OLS PLE
Pesticide <- c("ATZTOT","FipTOT","Imid","TNDTOT","Pendi","ATZTOT","FipTOT","Imid","TNDTOT","Pendi")
expKoc <- c(2.303,4.242,2.556,3.025,6.425,2.634,2.864,3.645,3.01,1.733)
litKoc <- c(2.24,2.92,2.39,2.71,3.7,2.24,2.92,2.39,2.71,3.7)
SoilType <- c("PLE","PLE","PLE","PLE","PLE","OLS","OLS","OLS","OLS","OLS")
df.merge <- data.frame(Pesticide, expKoc, litKoc, SoilType)
#View(merge(frog.soil, df.merge, all = TRUE))
frog.soil <- (merge(frog.soil, df.merge, all = TRUE))
Add organic carbon content data to dataframe.
# Soil Type %OM %OC
#Plott Series PLE 14.138 8.200
#Everbard EC 5.448 3.160
#Orangeburg loamy-sand OLS 3.100 1.798
SoilType <- c("PLE","OLS")
OM <- c(14.138, 3.1)
OC <- c(8.2, 1.798)
df.merge2 <- data.frame(SoilType, OM, OC)
frog.soil <- (merge(frog.soil, df.merge2, all = TRUE))
str(frog.soil)
## 'data.frame': 264 obs. of 18 variables:
## $ SoilType : Factor w/ 2 levels "OLS","PLE": 1 1 1 1 1 1 1 1 1 1 ...
## $ Pesticide : Factor w/ 17 levels "ATZ","ATZDEA",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Day : Factor w/ 4 levels "0","1","2","3": 3 3 3 3 3 3 3 3 3 3 ...
## $ Row : Factor w/ 7 levels "1","2","3","4",..: 2 4 5 7 1 2 4 5 5 7 ...
## $ Column : Factor w/ 10 levels "","A","B","C",..: 10 3 9 6 6 8 10 2 8 5 ...
## $ BodyBurden : num 0.728 0.27 0.237 1.9 0.566 ...
## $ Soil : num 16.6 12.3 21.6 29.2 14.2 ...
## $ Weight : num 11.1 12 17.4 11.8 11.1 ...
## $ Total : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
## $ Formulation : Factor w/ 2 levels "0","1": 1 1 1 1 2 2 2 2 2 2 ...
## $ Parent : Factor w/ 2 levels "0","1": 2 2 2 2 2 2 2 2 2 2 ...
## $ bowlbcf : num 0.044 0.022 0.011 0.065 0.0398 ...
## $ surface_area_total : num 4.57 4.76 5.91 4.71 4.55 ...
## $ surface_area_footprint: num 3.3 3.5 4.82 3.46 3.28 ...
## $ expKoc : num NA NA NA NA NA NA NA NA NA NA ...
## $ litKoc : num NA NA NA NA NA NA NA NA NA NA ...
## $ OM : num 3.1 3.1 3.1 3.1 3.1 3.1 3.1 3.1 3.1 3.1 ...
## $ OC : num 1.8 1.8 1.8 1.8 1.8 ...
Calculate mean and standard deviations for soil and amphibian tissure residue concentrations.
str(frog.soil)
## 'data.frame': 264 obs. of 18 variables:
## $ SoilType : Factor w/ 2 levels "OLS","PLE": 1 1 1 1 1 1 1 1 1 1 ...
## $ Pesticide : Factor w/ 17 levels "ATZ","ATZDEA",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Day : Factor w/ 4 levels "0","1","2","3": 3 3 3 3 3 3 3 3 3 3 ...
## $ Row : Factor w/ 7 levels "1","2","3","4",..: 2 4 5 7 1 2 4 5 5 7 ...
## $ Column : Factor w/ 10 levels "","A","B","C",..: 10 3 9 6 6 8 10 2 8 5 ...
## $ BodyBurden : num 0.728 0.27 0.237 1.9 0.566 ...
## $ Soil : num 16.6 12.3 21.6 29.2 14.2 ...
## $ Weight : num 11.1 12 17.4 11.8 11.1 ...
## $ Total : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
## $ Formulation : Factor w/ 2 levels "0","1": 1 1 1 1 2 2 2 2 2 2 ...
## $ Parent : Factor w/ 2 levels "0","1": 2 2 2 2 2 2 2 2 2 2 ...
## $ bowlbcf : num 0.044 0.022 0.011 0.065 0.0398 ...
## $ surface_area_total : num 4.57 4.76 5.91 4.71 4.55 ...
## $ surface_area_footprint: num 3.3 3.5 4.82 3.46 3.28 ...
## $ expKoc : num NA NA NA NA NA NA NA NA NA NA ...
## $ litKoc : num NA NA NA NA NA NA NA NA NA NA ...
## $ OM : num 3.1 3.1 3.1 3.1 3.1 3.1 3.1 3.1 3.1 3.1 ...
## $ OC : num 1.8 1.8 1.8 1.8 1.8 ...
head(frog.soil)
## SoilType Pesticide Day Row Column BodyBurden Soil Weight Total
## 1 OLS ATZ 2 2 I 0.7282998 16.55151 11.1447 0
## 2 OLS ATZ 2 4 B 0.2703513 12.28110 11.9615 0
## 3 OLS ATZ 2 5 H 0.2365494 21.60190 17.3882 0
## 4 OLS ATZ 2 7 E 1.8995641 29.24066 11.7687 0
## 5 OLS ATZ 2 1 E 0.5662302 14.23919 11.0822 0
## 6 OLS ATZ 2 2 G 1.9850391 19.48325 10.0690 0
## Formulation Parent bowlbcf surface_area_total surface_area_footprint
## 1 0 1 0.04400201 4.567885 3.299112
## 2 0 1 0.02201361 4.758833 3.503537
## 3 0 1 0.01095040 5.909763 4.815101
## 4 0 1 0.06496310 4.714269 3.455478
## 5 1 1 0.03976562 4.553036 3.283379
## 6 1 1 0.10188442 4.307167 3.026407
## expKoc litKoc OM OC
## 1 NA NA 3.1 1.798
## 2 NA NA 3.1 1.798
## 3 NA NA 3.1 1.798
## 4 NA NA 3.1 1.798
## 5 NA NA 3.1 1.798
## 6 NA NA 3.1 1.798
#View(frog.soil.total.ai)
#using dplyr
frog.soil.group <- group_by(frog.soil, Pesticide, SoilType, Formulation, Parent)
str(frog.soil.group)
## Classes 'grouped_df', 'tbl_df', 'tbl' and 'data.frame': 264 obs. of 18 variables:
## $ SoilType : Factor w/ 2 levels "OLS","PLE": 1 1 1 1 1 1 1 1 1 1 ...
## $ Pesticide : Factor w/ 17 levels "ATZ","ATZDEA",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Day : Factor w/ 4 levels "0","1","2","3": 3 3 3 3 3 3 3 3 3 3 ...
## $ Row : Factor w/ 7 levels "1","2","3","4",..: 2 4 5 7 1 2 4 5 5 7 ...
## $ Column : Factor w/ 10 levels "","A","B","C",..: 10 3 9 6 6 8 10 2 8 5 ...
## $ BodyBurden : num 0.728 0.27 0.237 1.9 0.566 ...
## $ Soil : num 16.6 12.3 21.6 29.2 14.2 ...
## $ Weight : num 11.1 12 17.4 11.8 11.1 ...
## $ Total : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
## $ Formulation : Factor w/ 2 levels "0","1": 1 1 1 1 2 2 2 2 2 2 ...
## $ Parent : Factor w/ 2 levels "0","1": 2 2 2 2 2 2 2 2 2 2 ...
## $ bowlbcf : num 0.044 0.022 0.011 0.065 0.0398 ...
## $ surface_area_total : num 4.57 4.76 5.91 4.71 4.55 ...
## $ surface_area_footprint: num 3.3 3.5 4.82 3.46 3.28 ...
## $ expKoc : num NA NA NA NA NA NA NA NA NA NA ...
## $ litKoc : num NA NA NA NA NA NA NA NA NA NA ...
## $ OM : num 3.1 3.1 3.1 3.1 3.1 3.1 3.1 3.1 3.1 3.1 ...
## $ OC : num 1.8 1.8 1.8 1.8 1.8 ...
## - attr(*, "vars")=List of 4
## ..$ : symbol Pesticide
## ..$ : symbol SoilType
## ..$ : symbol Formulation
## ..$ : symbol Parent
## - attr(*, "drop")= logi TRUE
## - attr(*, "indices")=List of 44
## ..$ : int 0 1 2 3 10 11
## ..$ : int 4 5 6 7 8 9
## ..$ : int 136 146 151 156 158 161
## ..$ : int 135 140 144 145 153 183
## ..$ : int 24 25 26 27 28 29
## ..$ : int 137 138 148 149 169 170
## ..$ : int 36 37 38 39 40 41
## ..$ : int 139 143 204 205 206 207
## ..$ : int 16 17 18 19 48 49
## ..$ : int 12 13 14 15 50 51
## ..$ : int 155 180 181 182 185 197
## ..$ : int 133 134 150 157 160 165
## ..$ : int 32 33 34 35 76 77
## ..$ : int 162 163 166 196 200 201
## ..$ : int 44 45 46 47 88 89
## ..$ : int 132 141 142 171 211 223
## ..$ : int 20 21 56 57 58 59
## ..$ : int 186 187 195 209 224 225
## ..$ : int 30 31 55 69 72 73
## ..$ : int 159 167 168 184 210 222
## ..$ : int 42 43 67 68 71 85
## ..$ : int 86 87 90 91 102 116
## ..$ : int 147 152 172 173 176 177
## ..$ : int 178 179 220 221 235 236
## ..$ : int 54 64 65 66 95 96
## ..$ : int 154 164 192 193 194 208
## ..$ : int 78 79 94 103 108 113
## ..$ : int 202 203 244 245 246 247
## ..$ : int 52 53 101 122 124 125
## ..$ : int 174 175 216 217 218 219
## ..$ : int 22 23 60 61 92 104
## ..$ : int 188 189 190 191 226 227
## ..$ : int 74 75 109 112 123 130
## ..$ : int 198 199 240 241 242 243
## ..$ : int 107 110 118 121 128 131
## ..$ : int 212 213 214 215 250 251
## ..$ : int 83 84 97 98 99 100
## ..$ : int 62 63 80 81 93 114
## ..$ : int 228 229 230 231 232 233
## ..$ : int 234 237 238 239 248 249
## ..$ : int 106 111 115 119 120 129
## ..$ : int 70 82 105 117 126 127
## ..$ : int 252 255 256 257 258 259
## ..$ : int 253 254 260 261 262 263
## - attr(*, "group_sizes")= int 6 6 6 6 6 6 6 6 6 6 ...
## - attr(*, "biggest_group_size")= int 6
## - attr(*, "labels")='data.frame': 44 obs. of 4 variables:
## ..$ Pesticide : Factor w/ 17 levels "ATZ","ATZDEA",..: 1 1 1 1 2 2 3 3 4 4 ...
## ..$ SoilType : Factor w/ 2 levels "OLS","PLE": 1 1 2 2 1 2 1 2 1 1 ...
## ..$ Formulation: Factor w/ 2 levels "0","1": 1 2 1 2 1 1 1 1 1 2 ...
## ..$ Parent : Factor w/ 2 levels "0","1": 2 2 2 2 1 1 1 1 2 2 ...
## ..- attr(*, "vars")=List of 4
## .. ..$ : symbol Pesticide
## .. ..$ : symbol SoilType
## .. ..$ : symbol Formulation
## .. ..$ : symbol Parent
## ..- attr(*, "drop")= logi TRUE
frog.soil.group
## Source: local data frame [264 x 18]
## Groups: Pesticide, SoilType, Formulation, Parent [44]
##
## SoilType Pesticide Day Row Column BodyBurden Soil Weight
## (fctr) (fctr) (fctr) (fctr) (fctr) (dbl) (dbl) (dbl)
## 1 OLS ATZ 2 2 I 0.7282998 16.551513 11.1447
## 2 OLS ATZ 2 4 B 0.2703513 12.281098 11.9615
## 3 OLS ATZ 2 5 H 0.2365494 21.601898 17.3882
## 4 OLS ATZ 2 7 E 1.8995641 29.240663 11.7687
## 5 OLS ATZ 2 1 E 0.5662302 14.239191 11.0822
## 6 OLS ATZ 2 2 G 1.9850391 19.483245 10.0690
## 7 OLS ATZ 2 4 I 0.2670444 18.094682 11.0174
## 8 OLS ATZ 2 5 A 0.2356130 18.492963 12.3638
## 9 OLS ATZ 2 5 G 0.3124082 7.940987 10.1878
## 10 OLS ATZ 2 7 D 0.2438387 16.933410 11.5272
## .. ... ... ... ... ... ... ... ...
## Variables not shown: Total (fctr), Formulation (fctr), Parent (fctr),
## bowlbcf (dbl), surface_area_total (dbl), surface_area_footprint (dbl),
## expKoc (dbl), litKoc (dbl), OM (dbl), OC (dbl)
frog.soil.means <- summarise(frog.soil.group,
count = n(),
FrogMean = mean(BodyBurden),
FrogSD = sd(BodyBurden),
SoilMean = mean(Soil),
SoilSD = sd(Soil)
)
frog.soil.means
## Source: local data frame [44 x 9]
## Groups: Pesticide, SoilType, Formulation [?]
##
## Pesticide SoilType Formulation Parent count FrogMean FrogSD
## (fctr) (fctr) (fctr) (fctr) (int) (dbl) (dbl)
## 1 ATZ OLS 0 1 6 0.81375385 0.65494784
## 2 ATZ OLS 1 1 6 0.60169561 0.68886190
## 3 ATZ PLE 0 1 6 0.43815022 0.23078164
## 4 ATZ PLE 1 1 6 0.52394830 0.33649791
## 5 ATZDEA OLS 0 0 6 0.56841980 0.85393496
## 6 ATZDEA PLE 0 0 6 0.11582458 0.09835748
## 7 ATZDIA OLS 0 0 6 0.56823951 0.84631021
## 8 ATZDIA PLE 0 0 6 0.07990814 0.07445182
## 9 ATZTOT OLS 0 1 6 1.95041316 2.30112861
## 10 ATZTOT OLS 1 1 6 0.82672856 0.66311851
## .. ... ... ... ... ... ... ...
## Variables not shown: SoilMean (dbl), SoilSD (dbl)
#View(frog.soil.means)
#Merge means and other statistics back into larger file.
frog.soil <- merge(frog.soil,frog.soil.means)
#treatment bcf
frog.soil$treatbcf <- frog.soil$BodyBurden/frog.soil$SoilMean
Setup of the complete main data set frog.soil.
dim(frog.soil)
## [1] 264 24
str(frog.soil)
## 'data.frame': 264 obs. of 24 variables:
## $ SoilType : Factor w/ 2 levels "OLS","PLE": 1 1 1 1 1 1 1 1 1 1 ...
## $ Pesticide : Factor w/ 17 levels "ATZ","ATZDEA",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Formulation : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 2 2 2 2 ...
## $ Parent : Factor w/ 2 levels "0","1": 2 2 2 2 2 2 2 2 2 2 ...
## $ Day : Factor w/ 4 levels "0","1","2","3": 3 3 3 3 3 3 3 3 3 3 ...
## $ Row : Factor w/ 7 levels "1","2","3","4",..: 2 4 5 7 1 2 1 2 5 7 ...
## $ Column : Factor w/ 10 levels "","A","B","C",..: 10 3 9 6 3 7 6 8 8 5 ...
## $ BodyBurden : num 0.728 0.27 0.237 1.9 0.472 ...
## $ Soil : num 16.6 12.3 21.6 29.2 29.7 ...
## $ Weight : num 11.14 11.96 17.39 11.77 9.56 ...
## $ Total : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
## $ bowlbcf : num 0.044 0.022 0.011 0.065 0.0159 ...
## $ surface_area_total : num 4.57 4.76 5.91 4.71 4.18 ...
## $ surface_area_footprint: num 3.3 3.5 4.82 3.46 2.9 ...
## $ expKoc : num NA NA NA NA NA NA NA NA NA NA ...
## $ litKoc : num NA NA NA NA NA NA NA NA NA NA ...
## $ OM : num 3.1 3.1 3.1 3.1 3.1 3.1 3.1 3.1 3.1 3.1 ...
## $ OC : num 1.8 1.8 1.8 1.8 1.8 ...
## $ count : int 6 6 6 6 6 6 6 6 6 6 ...
## $ FrogMean : num 0.814 0.814 0.814 0.814 0.814 ...
## $ FrogSD : num 0.655 0.655 0.655 0.655 0.655 ...
## $ SoilMean : num 21.2 21.2 21.2 21.2 21.2 ...
## $ SoilSD : num 7.08 7.08 7.08 7.08 7.08 ...
## $ treatbcf : num 0.0344 0.0128 0.0112 0.0897 0.0223 ...
Eliminate data that will not be used for this analysis and manuscript. Keep only total pesticide results and only for active ingredients, metabolites and formulations dropped.
## [1] 96 24
## [1] "SoilType" "Pesticide"
## [3] "Formulation" "Parent"
## [5] "Day" "Row"
## [7] "Column" "BodyBurden"
## [9] "Soil" "Weight"
## [11] "Total" "bowlbcf"
## [13] "surface_area_total" "surface_area_footprint"
## [15] "expKoc" "litKoc"
## [17] "OM" "OC"
## [19] "count" "FrogMean"
## [21] "FrogSD" "SoilMean"
## [23] "SoilSD" "treatbcf"
## [1] 60 24
## [1] "SoilType" "Pesticide"
## [3] "Formulation" "Parent"
## [5] "Day" "Row"
## [7] "Column" "BodyBurden"
## [9] "Soil" "Weight"
## [11] "Total" "bowlbcf"
## [13] "surface_area_total" "surface_area_footprint"
## [15] "expKoc" "litKoc"
## [17] "OM" "OC"
## [19] "count" "FrogMean"
## [21] "FrogSD" "SoilMean"
## [23] "SoilSD" "treatbcf"
This is the main table of summary results used in the results section for bcf (BodyBurden, treatbcf), for the soil table (SoilMean, SoilSD) and for the figure (treatbcf).
## SoilType Pesticide BodyBurden Weight SoilMean SoilSD treatbcf
## 25 OLS ATZTOT 1.46064176 11.1447 21.2428079 7.0764401 0.06875935
## 26 OLS ATZTOT 0.52120269 11.9615 21.2428079 7.0764401 0.02453549
## 27 OLS ATZTOT 0.52560138 17.3882 21.2428079 7.0764401 0.02474256
## 28 OLS ATZTOT 6.44380146 11.7687 21.2428079 7.0764401 0.30334038
## 29 OLS ATZTOT 0.56566678 9.5568 21.2428079 7.0764401 0.02662863
## 30 OLS ATZTOT 2.18556492 12.3541 21.2428079 7.0764401 0.10288494
## 49 OLS FipTOT 0.11486422 11.4650 1.1277660 0.2366155 0.10185112
## 50 OLS FipTOT 0.20865620 13.1914 1.1277660 0.2366155 0.18501729
## 51 OLS FipTOT 0.16426118 8.5539 1.1277660 0.2366155 0.14565183
## 52 OLS FipTOT 0.23054697 11.7796 1.1277660 0.2366155 0.20442803
## 53 OLS FipTOT 0.21070688 9.0658 1.1277660 0.2366155 0.18683564
## 54 OLS FipTOT 0.02176222 12.1780 1.1277660 0.2366155 0.01929675
## 55 OLS Imid 0.06442277 13.3005 0.9461988 0.2938928 0.06808587
## 56 OLS Imid 0.01826123 9.7913 0.9461988 0.2938928 0.01929957
## 57 OLS Imid 0.02228348 10.7167 0.9461988 0.2938928 0.02355053
## 58 OLS Imid 0.06167752 14.0828 0.9461988 0.2938928 0.06518453
## 59 OLS Imid 0.01975240 12.9804 0.9461988 0.2938928 0.02087553
## 60 OLS Imid 0.02546796 6.9639 0.9461988 0.2938928 0.02691608
## 61 OLS Pendi 2.91725907 8.7943 11.3041556 4.0505885 0.25806961
## 62 OLS Pendi 1.49240271 13.4299 11.3041556 4.0505885 0.13202248
## 63 OLS Pendi 4.28797143 8.3589 11.3041556 4.0505885 0.37932700
## 64 OLS Pendi 1.88809736 13.5552 11.3041556 4.0505885 0.16702684
## 65 OLS Pendi 6.87443859 14.8081 11.3041556 4.0505885 0.60813375
## 66 OLS Pendi 4.72956855 12.4980 11.3041556 4.0505885 0.41839202
## 121 OLS TNDTOT 0.18943419 12.0198 4.5043837 1.7086510 0.04205552
## 122 OLS TNDTOT 0.48645817 11.4182 4.5043837 1.7086510 0.10799661
## 123 OLS TNDTOT 0.36995225 8.1326 4.5043837 1.7086510 0.08213160
## 124 OLS TNDTOT 0.38885487 13.2227 4.5043837 1.7086510 0.08632810
## 125 OLS TNDTOT 0.25996247 10.8067 4.5043837 1.7086510 0.05771322
## 126 OLS TNDTOT 0.27350838 14.0841 4.5043837 1.7086510 0.06072049
## 157 PLE ATZTOT 0.70094008 8.3884 26.7836234 8.8994554 0.02617047
## 158 PLE ATZTOT 0.81865706 16.5900 26.7836234 8.8994554 0.03056558
## 159 PLE ATZTOT 1.22722709 15.8694 26.7836234 8.8994554 0.04582005
## 160 PLE ATZTOT 0.33713548 13.1831 26.7836234 8.8994554 0.01258737
## 161 PLE ATZTOT 0.36701946 14.5384 26.7836234 8.8994554 0.01370313
## 162 PLE ATZTOT 0.35231843 16.4296 26.7836234 8.8994554 0.01315425
## 181 PLE FipTOT 0.12941329 11.2404 1.7819593 0.3751047 0.07262416
## 182 PLE FipTOT 0.05574173 11.3478 1.7819593 0.3751047 0.03128115
## 183 PLE FipTOT 0.03211810 10.7426 1.7819593 0.3751047 0.01802404
## 184 PLE FipTOT 0.16419294 10.8321 1.7819593 0.3751047 0.09214180
## 185 PLE FipTOT 0.03516470 7.3804 1.7819593 0.3751047 0.01973373
## 186 PLE FipTOT 0.11381305 23.3405 1.7819593 0.3751047 0.06386961
## 187 PLE Imid 0.01989700 13.0377 1.3255353 0.9561492 0.01501054
## 188 PLE Imid 0.01592047 13.1817 1.3255353 0.9561492 0.01201060
## 189 PLE Imid 0.06281307 8.0000 1.3255353 0.9561492 0.04738695
## 190 PLE Imid 0.01812019 13.9860 1.3255353 0.9561492 0.01367009
## 191 PLE Imid 0.07472157 12.9241 1.3255353 0.9561492 0.05637087
## 192 PLE Imid 0.05015093 18.1095 1.3255353 0.9561492 0.03783448
## 193 PLE Pendi 3.99361288 10.0699 14.5431306 5.7954823 0.27460476
## 194 PLE Pendi 1.38470843 13.4690 14.5431306 5.7954823 0.09521392
## 195 PLE Pendi 2.75808902 11.8384 14.5431306 5.7954823 0.18964892
## 196 PLE Pendi 5.19995105 7.5145 14.5431306 5.7954823 0.35755376
## 197 PLE Pendi 1.81167423 13.2906 14.5431306 5.7954823 0.12457251
## 198 PLE Pendi 2.53931582 11.6099 14.5431306 5.7954823 0.17460586
## 253 PLE TNDTOT 0.16584806 11.5642 5.0991142 2.1139913 0.03252488
## 254 PLE TNDTOT 0.08932248 10.5903 5.0991142 2.1139913 0.01751725
## 255 PLE TNDTOT 0.42670513 13.9438 5.0991142 2.1139913 0.08368221
## 256 PLE TNDTOT 0.17567680 9.5231 5.0991142 2.1139913 0.03445242
## 257 PLE TNDTOT 0.11549275 12.4407 5.0991142 2.1139913 0.02264957
## 258 PLE TNDTOT 0.11903795 8.8434 5.0991142 2.1139913 0.02334483
Analysis of total analyte active ingredients concentration data set. Previously, two alternative methods for calculating bioconcentration factors were used: dividing the amphibian tissue residue concentration of each bowl by the soil concentration within that bowl (bowlbcfs) and also dividing the amphibian tissue residue concentration of each bowl be the mean of all the bowls within the treatment (treatbcfs).
A paired comparison design is implemented to examine the impacts of soil type and surface area. The paired comparison design is essentially a randomized block design where the blocking variable (pesticides) has size 2 and is therefore treated as a nuisance variable. This controls for the large variation in treatment application rates and uptake across the different pesticides tested. The paired comparison design on the bowl bcf finds soil type significant, but not amphibian surface area.
We evaluate 3 different paired comparison designs: with bowlbcfs, where each frog tissue concentration is divided by its soil concentration, mean bcf (treatbcf), where each frog tissue concentration is divided by the mean of the soil concentrations for that treatment, and by body.burden where soil concentration is used as an additional covariate instead of in the divisor.
## Df Sum Sq Mean Sq F value Pr(>F)
## Pesticide 4 0.8852 0.22130 16.231 5.76e-10 ***
## SoilType 1 0.0262 0.02617 1.919 0.169
## Formulation 1 0.0300 0.03000 2.200 0.142
## surface_area_total 1 0.0062 0.00615 0.451 0.504
## expKoc 1 0.0005 0.00051 0.038 0.847
## Residuals 87 1.1862 0.01363
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Df Sum Sq Mean Sq F value Pr(>F)
## Pesticide 4 0.6790 0.16975 23.153 4.73e-13 ***
## SoilType 1 0.0131 0.01306 1.781 0.186
## Formulation 1 0.0145 0.01451 1.979 0.163
## surface_area_total 1 0.0146 0.01459 1.990 0.162
## expKoc 1 0.0077 0.00772 1.053 0.308
## Residuals 87 0.6379 0.00733
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Bowl bcf results and figure.
# is imidacloprid being factored in correctly for the aov
bowlbcf.total.ai.aov <- aov(bowlbcf ~ Pesticide + SoilType + surface_area_total + expKoc,
data = frog.soil.total.ai)
summary(bowlbcf.total.ai.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## Pesticide 4 0.6372 0.15929 9.456 8.03e-06 ***
## SoilType 1 0.0821 0.08211 4.875 0.0317 *
## surface_area_total 1 0.0015 0.00154 0.091 0.7638
## expKoc 1 0.0304 0.03035 1.802 0.1853
## Residuals 52 0.8759 0.01684
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
This figue based on bowlbcfs is not used in the manuscript.
qplot(Pesticide, bowlbcf, fill=factor(SoilType), data=frog.soil.total.ai, geom="boxplot", position="dodge")+theme_bw()
Treatment bcf results and figure. These analysis of variance results and the figure are used in the Van Meter at al. document. Context for interpretation - http://www.bodowinter.com/tutorial/bw_anova_general.pdf
Significance of soiltype: p = 0.00165, F= 10.999, df1 = 1, df2 = 53.
treatbcf.total.ai.aov <- aov(treatbcf ~ Pesticide + SoilType + expKoc,
data = frog.soil.total.ai)
summary(treatbcf.total.ai.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## Pesticide 4 0.4257 0.10642 18.180 1.87e-09 ***
## SoilType 1 0.0644 0.06438 10.999 0.00165 **
## expKoc 1 0.0201 0.02012 3.438 0.06928 .
## Residuals 53 0.3102 0.00585
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
model.tables(treatbcf.total.ai.aov)
## Warning in replications(paste("~", xx), data = mf): non-factors ignored:
## expKoc
## Tables of effects
##
## Pesticide
## Pesticide
## ATZTOT FipTOT Imid Pendi TNDTOT
## -0.04343 -0.00611 -0.06732 0.16376 -0.04691
##
## SoilType
## SoilType
## OLS PLE
## 0.03276 -0.03276
##
## expKoc
## expKoc
## 1.733 2.303 2.556 2.634 2.864 3.01 3.025 3.645
## 0.03371 0.01133 0.01813 -0.01133 0.00399 -0.00823 0.00823 -0.01813
## 4.242 6.425
## -0.00399 -0.03371
Generate figure as png for the manuscript. ggplot boxplots are different than regular R boxplots: http://docs.ggplot2.org/0.9.3.1/geom_boxplot.html
The upper and lower “hinges” correspond to the first and third quartiles (the 25th and 75th percentiles). The upper whisker extends from the hinge to the highest value that is within 1.5 * IQR of the hinge, where IQR is the inter-quartile range, or distance between the first and third quartiles. The lower whisker extends from the hinge to the lowest value within 1.5 * IQR of the hinge. Data beyond the end of the whiskers are outliers and plotted as points (as specified by Tukey).
#figure 1 of Van Meter et al. manuscript
#pdf(paste(frogsoildir,"rvm2016_fig1.pdf", sep=""))
#levels(frog.soil.total.ai$Pesticide)
#levels(droplevels(frog.soil.total.ai$Pesticide))
#frog.soil.total.ai$Pesticide = factor(frog.soil.total.ai$Pesticide,levels(
# frog.soil.total.ai$Pesticide)[c("Imid", "ATZTOT", "TNDTOT", "FipTOT", "Pendi")])
frog.soil.total.ai$Pesticide <- factor(frog.soil.total.ai$Pesticide, levels = c("Imid", "ATZTOT", "TNDTOT", "FipTOT", "Pendi"), ordered = TRUE)
#levels(frog.soil.total.ai$Pesticide) <- c("Imid", "ATZTOT", "TNDTOT", "FipTOT", "Pendi")
png(paste(frogsoildir,"rvm2016_fig1.png", sep=""))
pesticides <- c("Imidacloprid", "Atrazine", "Triadimefon", "Fipronil", "Pendimethalin")
qplot(x=Pesticide, y=treatbcf, fill=factor(SoilType), xlab="", ylab="Bioconcentration Factor",
data=frog.soil.total.ai, geom="boxplot", position="dodge") + theme_bw() +
scale_x_discrete(breaks=c("Imid", "ATZTOT", "TNDTOT", "FipTOT", "Pendi"), labels=pesticides) +
guides(fill=guide_legend(title="Soil Type")) + theme(legend.position="top")
dev.off()
## png
## 2
For the html.
#pesticides <- c("Atrazine", "Fipronil", "Imidacloprid", "Pendimethalin", "Triadimefon")
#reordering by kow
pesticides <- c("Imidacloprid", "Atrazine", "Triadimefon", "Fipronil", "Pendimethalin")
qplot(x=Pesticide, y=treatbcf, fill=factor(SoilType), xlab="", ylab="Bioconcentration Factor",
data=frog.soil.total.ai, geom="boxplot", position="dodge") +
theme_bw() +
scale_x_discrete(breaks=c("Imid", "ATZTOT", "TNDTOT", "FipTOT", "Pendi"), labels=pesticides) +
guides(fill=guide_legend(title="Soil Type")) + theme(legend.position="top")
A figure.
boxplot(treatbcf ~ Pesticide + SoilType, data =frog.soil.total.ai)
We considered dropping imidacloprid for analytical reasons but it was unnecessary.
# more significant if imidacloprid is dropped (but not necessary)
bowlbcf.total.noimid.aov <- aov(bowlbcf ~ Pesticide + SoilType + surface_area_total,
data = frog.soil.total.noimid)
summary(bowlbcf.total.noimid.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## Pesticide 3 0.5563 0.18543 8.857 0.000115 ***
## SoilType 1 0.0961 0.09613 4.592 0.037968 *
## surface_area_total 1 0.0001 0.00013 0.006 0.936840
## Residuals 42 0.8793 0.02094
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
treatbcf.total.noimid.aov <- aov(treatbcf ~ Pesticide + SoilType + surface_area_total,
data = frog.soil.total.noimid)
summary(treatbcf.total.noimid.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## Pesticide 3 0.3577 0.11924 16.072 4.18e-07 ***
## SoilType 1 0.0771 0.07711 10.394 0.00245 **
## surface_area_total 1 0.0014 0.00142 0.192 0.66354
## Residuals 42 0.3116 0.00742
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Tukey as anova post-hoc proxy.
TukeyHSD(treatbcf.total.ai.aov)
## Warning in replications(paste("~", xx), data = mf): non-factors ignored:
## expKoc
## Warning in TukeyHSD.aov(treatbcf.total.ai.aov): 'which' specified some non-
## factors which will be dropped
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = treatbcf ~ Pesticide + SoilType + expKoc, data = frog.soil.total.ai)
##
## $Pesticide
## diff lwr upr p adj
## FipTOT-ATZTOT 0.037321911 -0.05088198 0.12552581 0.7542455
## Imid-ATZTOT -0.023891382 -0.11209528 0.06431251 0.9394943
## Pendi-ATZTOT 0.207189936 0.11898604 0.29539383 0.0000002
## TNDTOT-ATZTOT -0.003481293 -0.09168519 0.08472260 0.9999639
## Imid-FipTOT -0.061213293 -0.14941719 0.02699060 0.2996226
## Pendi-FipTOT 0.169868025 0.08166413 0.25807192 0.0000135
## TNDTOT-FipTOT -0.040803204 -0.12900710 0.04740069 0.6884923
## Pendi-Imid 0.231081318 0.14287742 0.31928521 0.0000000
## TNDTOT-Imid 0.020410089 -0.06779381 0.10861398 0.9652483
## TNDTOT-Pendi -0.210671229 -0.29887512 -0.12246733 0.0000001
##
## $SoilType
## diff lwr upr p adj
## PLE-OLS -0.06551572 -0.1051385 -0.02589299 0.0016508
Bartletts test results.
#Bartlett test to test the null hypothesis of equal group variances
bartlett.test(treatbcf ~ Pesticide, data =frog.soil.total.ai)
##
## Bartlett test of homogeneity of variances
##
## data: treatbcf by Pesticide
## Bartlett's K-squared = 44.549, df = 4, p-value = 4.935e-09
#no sale! for pesticides
bartlett.test(treatbcf ~ SoilType, data = frog.soil.total.ai)
##
## Bartlett test of homogeneity of variances
##
## data: treatbcf by SoilType
## Bartlett's K-squared = 7.5497, df = 1, p-value = 0.006002
#also rejected for soil type, but not grouped by pesticide
Bartletts test results.
#the oneway.test( ) applies a Welch correction for nonhomogeneity
oneway.test(treatbcf ~ Pesticide + SoilType, data =frog.soil.total.ai)
##
## One-way analysis of means (not assuming equal variances)
##
## data: treatbcf and Pesticide + SoilType
## F = 6.0442, num df = 9.000, denom df = 20.078, p-value = 0.0003999
Kruskal test results.
#nonparameteric kruskal test
kruskal.test(treatbcf ~ Pesticide, data =frog.soil.total.ai)
##
## Kruskal-Wallis rank sum test
##
## data: treatbcf by Pesticide
## Kruskal-Wallis chi-squared = 27.98, df = 4, p-value = 1.259e-05
kruskal.test(treatbcf ~ SoilType, data =frog.soil.total.ai)
##
## Kruskal-Wallis rank sum test
##
## data: treatbcf by SoilType
## Kruskal-Wallis chi-squared = 7.0035, df = 1, p-value = 0.008135
We can also consider the pairwise t-test. For this we need the means of the pesticide treatements by soil for the test. Doesn’t make any sense.