tested hypotheses

list

things to do

list

general configuration

Install and load supporting libraries.

##          nodename 
## "DZ2626UTPURUCKE"
## [1] "R version 3.2.3 (2015-12-10)"
## [1] "list of loaded packages: "
##  [1] "knitr"     "dplyr"     "rmarkdown" "stats"     "graphics" 
##  [6] "grDevices" "utils"     "datasets"  "methods"   "base"

import experimental exposure and dehydration data

Load csv file with experimental dehydration data. The below may return false but still be OK if rstudio does not have privileges to data directory (e.g., attached drive).

## [1] "Root directory location: k:/git/glinski_dehydration/"
## [1] "check to see if R can access files OK: FALSE"

dehydration exposure data structure

Check out structure of imported data sets.

str(dehyd)
## 'data.frame':    1494 obs. of  7 variables:
##  $ time   : int  0 0 0 0 0 0 2 2 2 2 ...
##  $ parent : Factor w/ 5 levels "atrazine","chloro",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ analyte: Factor w/ 12 levels "atrazine","chloro",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ matrix : Factor w/ 3 levels "amphib","amphibi",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ species: Factor w/ 2 levels "BA","LF": 2 2 2 2 2 2 2 2 2 2 ...
##  $ conc   : num  2.58 1.69 12.52 2.97 8.05 ...
##  $ ID     : Factor w/ 600 levels "BA A 0-1","BA A 0-1 S1",..: 241 243 245 247 249 251 265 267 269 271 ...
unique(dehyd$parent)
## [1] atrazine chloro   metol    tdn      imid    
## Levels: atrazine chloro imid metol tdn
unique(dehyd$analyte)
##  [1] atrazine  dia       dea       chloromet chloro    metol     mesa     
##  [8] moxa      tdn       tdla      tdlb      imid     
## 12 Levels: atrazine chloro chloromet dea dia imid mesa metol moxa ... tdn
unique(dehyd$matrix)
## [1] amphib  soil    amphibi
## Levels: amphib amphibi soil
unique(dehyd$species)
## [1] LF BA
## Levels: BA LF
#View(dehyd)

dehyd.amphib <- dehyd[which(dehyd$matrix=="amphib"),]
dehyd.soil <- dehyd[which(dehyd$matrix=="soil"),]

#atrazine
dehyd.amphib.atrazine <- dehyd.amphib[which(dehyd.amphib$parent=="atrazine"),]
View(dehyd.amphib.atrazine)
dehyd.amphib.atrazine.atrazine <-   dehyd.amphib.atrazine[which(dehyd.amphib.atrazine$analyte=="atrazine"),]
dehyd.amphib.atrazine.dea <-   dehyd.amphib.atrazine[which(dehyd.amphib.atrazine$analyte=="dea"),]
dehyd.amphib.atrazine.dia <-   dehyd.amphib.atrazine[which(dehyd.amphib.atrazine$analyte=="dia"),]
str(dehyd.amphib.atrazine)
## 'data.frame':    198 obs. of  7 variables:
##  $ time   : int  0 0 0 0 0 0 2 2 2 2 ...
##  $ parent : Factor w/ 5 levels "atrazine","chloro",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ analyte: Factor w/ 12 levels "atrazine","chloro",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ matrix : Factor w/ 3 levels "amphib","amphibi",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ species: Factor w/ 2 levels "BA","LF": 2 2 2 2 2 2 2 2 2 2 ...
##  $ conc   : num  2.58 1.69 12.52 2.97 8.05 ...
##  $ ID     : Factor w/ 600 levels "BA A 0-1","BA A 0-1 S1",..: 241 243 245 247 249 251 265 267 269 271 ...
dim(dehyd.amphib.atrazine.atrazine)
## [1] 66  7
#create atrazine plus metabolites dataframe
dehyd.amphib.atrazine.atrazineD <- dehyd.amphib.atrazine.atrazine
conc <- aggregate(dehyd.amphib.atrazine$conc, by=list(Category=dehyd.amphib.atrazine$ID), FUN=sum)
dim(conc)
## [1] 66  2
colnames(conc) <- c("ID","conc2")
#View(conc)
#View(cbind(dehyd.amphib.atrazine.atrazineD, conc))
colnames(dehyd.amphib.atrazine.atrazineD)
## [1] "time"    "parent"  "analyte" "matrix"  "species" "conc"    "ID"
colnames(conc)
## [1] "ID"    "conc2"
dehyd.amphib.atrazine.atrazineD <- merge(dehyd.amphib.atrazine.atrazineD, conc)
dehyd.amphib.atrazine.atrazineD$analyte <- "atrazineD"
dehyd.amphib.atrazine.atrazineD$conc <- dehyd.amphib.atrazine.atrazineD$conc2
dehyd.amphib.atrazine.atrazineD <- subset(dehyd.amphib.atrazine.atrazineD, select=-c(conc2))
#View(dehyd.amphib.atrazine.atrazineD)

#chlorothalonil
dehyd.amphib.chloro <- dehyd.amphib[which(dehyd.amphib$parent=="chloro"),]
dehyd.amphib.chloro.chloro <- dehyd.amphib.chloro[which(dehyd.amphib.chloro$analyte=="chloro"),]
dehyd.amphib.chloro.chloromet <- dehyd.amphib.chloro[which(dehyd.amphib.chloro$analyte=="chloromet"),]
##chlorothalonil data NA
##create chloro plus metabolites dataframe
#dehyd.amphib.chloro.chloroD <- dehyd.amphib.chloro.chloro
#conc <- aggregate(dehyd.amphib.chloro$conc, by=list(Category=dehyd.amphib.chloro$ID), FUN=sum)
#dim(conc)
#colnames(conc) <- c("ID","conc2")
##View(conc)
##View(cbind(dehyd.amphib.chloro.chloroD, conc))
#colnames(dehyd.amphib.chloro.chloroD)
#colnames(conc)
#dehyd.amphib.chloro.chloroD <- merge(dehyd.amphib.chloro.chloroD, conc)
#dehyd.amphib.chloro.chloroD$analyte <- "chloroD"
#dehyd.amphib.chloro.chloroD$conc <- dehyd.amphib.chloro.chloroD$conc2
#dehyd.amphib.chloro.chloroD <- subset(dehyd.amphib.chloro.chloroD, select=-c(conc2))
##View(dehyd.amphib.chloro.chloroD)

#imidacloprid
dehyd.amphib.imid <- dehyd.amphib[which(dehyd.amphib$parent=="imid"),]
dehyd.amphib.imid.imid <- dehyd.amphib.imid[which(dehyd.amphib.imid$analyte=="imid"),]

#metolachlor
dehyd.amphib.metol <- dehyd.amphib[which(dehyd.amphib$parent=="metol"),]
dehyd.amphib.metol.metol <- dehyd.amphib.metol[which(dehyd.amphib.metol$analyte=="metol"),]
dehyd.amphib.metol.mesa <- dehyd.amphib.metol[which(dehyd.amphib.metol$analyte=="mesa"),]
dehyd.amphib.metol.moxa <- dehyd.amphib.metol[which(dehyd.amphib.metol$analyte=="moxa"),]
#create metol plus metabolites dataframe
dehyd.amphib.metol.metolD <- dehyd.amphib.metol.metol
conc <- aggregate(dehyd.amphib.metol$conc, by=list(Category=dehyd.amphib.metol$ID), FUN=sum)
dim(conc)
## [1] 66  2
colnames(conc) <- c("ID","conc2")
#View(conc)
#View(cbind(dehyd.amphib.metol.metolD, conc))
colnames(dehyd.amphib.metol.metolD)
## [1] "time"    "parent"  "analyte" "matrix"  "species" "conc"    "ID"
colnames(conc)
## [1] "ID"    "conc2"
dehyd.amphib.metol.metolD <- merge(dehyd.amphib.metol.metolD, conc)
dehyd.amphib.metol.metolD$analyte <- "metolD"
dehyd.amphib.metol.metolD$conc <- dehyd.amphib.metol.metolD$conc2
dehyd.amphib.metol.metolD <- subset(dehyd.amphib.metol.metolD, select=-c(conc2))
#View(dehyd.amphib.atrazine.atrazineD)

#tridimefon
dehyd.amphib.tdn <- dehyd.amphib[which(dehyd.amphib$parent=="tdn"),]
dehyd.amphib.tdn.tdn <- dehyd.amphib.tdn[which(dehyd.amphib.tdn$analyte=="tdn"),]
dehyd.amphib.tdn.tdla <- dehyd.amphib.tdn[which(dehyd.amphib.tdn$analyte=="tdla"),]
dehyd.amphib.tdn.tdlb <- dehyd.amphib.tdn[which(dehyd.amphib.tdn$analyte=="tdlb"),]
#create tdn plus metabolites dataframe
dehyd.amphib.tdn.tdnD <- dehyd.amphib.tdn.tdn
conc <- aggregate(dehyd.amphib.tdn$conc, by=list(Category=dehyd.amphib.tdn$ID), FUN=sum)
dim(conc)
## [1] 66  2
colnames(conc) <- c("ID","conc2")
#View(conc)
#View(cbind(dehyd.amphib.tdn.tdnD, conc))
colnames(dehyd.amphib.tdn.tdnD)
## [1] "time"    "parent"  "analyte" "matrix"  "species" "conc"    "ID"
colnames(conc)
## [1] "ID"    "conc2"
dehyd.amphib.tdn.tdnD <- merge(dehyd.amphib.tdn.tdnD, conc)
dehyd.amphib.tdn.tdnD$analyte <- "tdnD"
dehyd.amphib.tdn.tdnD$conc <- dehyd.amphib.tdn.tdnD$conc2
dehyd.amphib.tdn.tdnD <- subset(dehyd.amphib.tdn.tdnD, select=-c(conc2))
#View(dehyd.amphib.tdn.tdnD)

Significance testing. atrazine. time is significant with a negative slope, opposite what we expected

print("atrazine")
## [1] "atrazine"
str(dehyd.amphib.atrazine.atrazine)
## 'data.frame':    66 obs. of  7 variables:
##  $ time   : int  0 0 0 0 0 0 2 2 2 2 ...
##  $ parent : Factor w/ 5 levels "atrazine","chloro",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ analyte: Factor w/ 12 levels "atrazine","chloro",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ matrix : Factor w/ 3 levels "amphib","amphibi",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ species: Factor w/ 2 levels "BA","LF": 2 2 2 2 2 2 2 2 2 2 ...
##  $ conc   : num  2.58 1.69 12.52 2.97 8.05 ...
##  $ ID     : Factor w/ 600 levels "BA A 0-1","BA A 0-1 S1",..: 241 243 245 247 249 251 265 267 269 271 ...
time <- dehyd.amphib.atrazine.atrazine$time
conc <- dehyd.amphib.atrazine.atrazine$conc
species <- dehyd.amphib.atrazine.atrazine$species
plot(time, conc)

atrazine.lm <- lm(conc ~ time + species)
summary(atrazine.lm)
## 
## Call:
## lm(formula = conc ~ time + species)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -7.866 -4.014 -0.482  2.702 13.344 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  10.9405     1.1686   9.362 1.54e-13 ***
## time         -0.3783     0.1642  -2.304 0.024518 *  
## speciesLF    -3.9729     1.1262  -3.528 0.000788 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.556 on 63 degrees of freedom
## Multiple R-squared:  0.2199, Adjusted R-squared:  0.1951 
## F-statistic: 8.877 on 2 and 63 DF,  p-value: 0.0004013

atrazine+D. time is significant with a negative slope, opposite what we expected

print("atrazineD")
## [1] "atrazineD"
str(dehyd.amphib.atrazine.atrazineD)
## 'data.frame':    66 obs. of  7 variables:
##  $ ID     : Factor w/ 600 levels "BA A 0-1","BA A 0-1 S1",..: 1 3 5 7 9 11 13 15 17 19 ...
##  $ time   : int  0 0 0 0 0 10 10 10 10 10 ...
##  $ parent : Factor w/ 5 levels "atrazine","chloro",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ analyte: chr  "atrazineD" "atrazineD" "atrazineD" "atrazineD" ...
##  $ matrix : Factor w/ 3 levels "amphib","amphibi",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ species: Factor w/ 2 levels "BA","LF": 1 1 1 1 1 1 1 1 1 1 ...
##  $ conc   : num  16.4 34 10.7 23.9 17.9 ...
time <- dehyd.amphib.atrazine.atrazineD$time
conc <- dehyd.amphib.atrazine.atrazineD$conc
species <- dehyd.amphib.atrazine.atrazineD$species
plot(time, conc)

atrazineD.lm <- lm(conc ~ time + species)
summary(atrazineD.lm)
## 
## Call:
## lm(formula = conc ~ time + species)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -12.546  -5.658   0.018   3.034  22.255 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  21.3210     1.8746  11.374  < 2e-16 ***
## time         -0.7002     0.2634  -2.659  0.00993 ** 
## speciesLF   -10.0730     1.8065  -5.576 5.51e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 7.308 on 63 degrees of freedom
## Multiple R-squared:  0.3772, Adjusted R-squared:  0.3575 
## F-statistic: 19.08 on 2 and 63 DF,  p-value: 3.323e-07

chlorothalonil. no concs in data set, use chloromet isntead

print("chlorothalonil-met")
## [1] "chlorothalonil-met"
#View(dehyd.amphib.chloro.chloro)
str(dehyd.amphib.chloro.chloromet)
## 'data.frame':    66 obs. of  7 variables:
##  $ time   : int  0 0 0 0 0 0 2 2 2 2 ...
##  $ parent : Factor w/ 5 levels "atrazine","chloro",..: 2 2 2 2 2 2 2 2 2 2 ...
##  $ analyte: Factor w/ 12 levels "atrazine","chloro",..: 3 3 3 3 3 3 3 3 3 3 ...
##  $ matrix : Factor w/ 3 levels "amphib","amphibi",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ species: Factor w/ 2 levels "BA","LF": 2 2 2 2 2 2 2 2 2 2 ...
##  $ conc   : num  0.0495 0.0943 0.0659 0.0667 0.0546 ...
##  $ ID     : Factor w/ 600 levels "BA A 0-1","BA A 0-1 S1",..: 313 315 317 319 321 323 337 339 341 343 ...
time <- dehyd.amphib.chloro.chloromet$time
conc <- dehyd.amphib.chloro.chloromet$conc
species <- dehyd.amphib.chloro.chloromet$species
plot(time, conc)

chloromet.lm <- lm(conc ~ time + species)
summary(chloromet.lm)
## 
## Call:
## lm(formula = conc ~ time + species)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.040090 -0.020910 -0.005321  0.007822  0.114904 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.091950   0.008108  11.340   <2e-16 ***
## time        -0.002376   0.001139  -2.086   0.0411 *  
## speciesLF   -0.012989   0.007814  -1.662   0.1014    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.03161 on 63 degrees of freedom
## Multiple R-squared:  0.1015, Adjusted R-squared:  0.07292 
## F-statistic: 3.556 on 2 and 63 DF,  p-value: 0.0344

imidacloprod.

print("imidacloprid")
## [1] "imidacloprid"
#View(dehyd.amphib.imid.imid)
str(dehyd.amphib.imid.imid)
## 'data.frame':    36 obs. of  7 variables:
##  $ time   : int  0 0 0 0 0 0 2 2 2 2 ...
##  $ parent : Factor w/ 5 levels "atrazine","chloro",..: 3 3 3 3 3 3 3 3 3 3 ...
##  $ analyte: Factor w/ 12 levels "atrazine","chloro",..: 6 6 6 6 6 6 6 6 6 6 ...
##  $ matrix : Factor w/ 3 levels "amphib","amphibi",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ species: Factor w/ 2 levels "BA","LF": 2 2 2 2 2 2 2 2 2 2 ...
##  $ conc   : num  0.731 1.059 0.729 0.814 0.607 ...
##  $ ID     : Factor w/ 600 levels "BA A 0-1","BA A 0-1 S1",..: 385 387 389 391 393 395 409 411 413 415 ...
time <- dehyd.amphib.imid.imid$time
conc <- dehyd.amphib.imid.imid$conc
species <- dehyd.amphib.imid.imid$species
plot(time, conc)

#only one species
imid.lm <- lm(conc ~ time) # + species
summary(imid.lm)
## 
## Call:
## lm(formula = conc ~ time)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.42936 -0.20825 -0.05126  0.09901  1.05052 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.65578    0.09014   7.275 2.01e-08 ***
## time        -0.02078    0.01489  -1.396    0.172    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3051 on 34 degrees of freedom
## Multiple R-squared:  0.05423,    Adjusted R-squared:  0.02641 
## F-statistic: 1.949 on 1 and 34 DF,  p-value: 0.1717

metolachlor.

print("metolachlor")
## [1] "metolachlor"
#View(dehyd.amphib.imid.imid)
str(dehyd.amphib.metol.metol)
## 'data.frame':    66 obs. of  7 variables:
##  $ time   : int  0 0 0 0 0 0 2 2 2 2 ...
##  $ parent : Factor w/ 5 levels "atrazine","chloro",..: 4 4 4 4 4 4 4 4 4 4 ...
##  $ analyte: Factor w/ 12 levels "atrazine","chloro",..: 8 8 8 8 8 8 8 8 8 8 ...
##  $ matrix : Factor w/ 3 levels "amphib","amphibi",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ species: Factor w/ 2 levels "BA","LF": 2 2 2 2 2 2 2 2 2 2 ...
##  $ conc   : num  4.268 5.722 1.749 0.806 10.639 ...
##  $ ID     : Factor w/ 600 levels "BA A 0-1","BA A 0-1 S1",..: 457 459 461 463 465 467 481 483 485 487 ...
time <- dehyd.amphib.metol.metol$time
conc <- dehyd.amphib.metol.metol$conc
species <- dehyd.amphib.metol.metol$species
plot(time, conc)

#only one species
metol.lm <- lm(conc ~ time + species) # + species
summary(metol.lm)
## 
## Call:
## lm(formula = conc ~ time + species)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.0449 -1.3833 -0.4867  0.9034 12.8915 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  3.39199    0.64054   5.296  1.6e-06 ***
## time        -0.14008    0.08999  -1.557    0.125    
## speciesLF    0.01811    0.61729   0.029    0.977    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.497 on 63 degrees of freedom
## Multiple R-squared:  0.03705,    Adjusted R-squared:  0.00648 
## F-statistic: 1.212 on 2 and 63 DF,  p-value: 0.3044

metolachlorD.

print("metolachlorD")
## [1] "metolachlorD"
#View(dehyd.amphib.imid.imid)
str(dehyd.amphib.metol.metolD)
## 'data.frame':    66 obs. of  7 variables:
##  $ ID     : Factor w/ 600 levels "BA A 0-1","BA A 0-1 S1",..: 121 123 125 127 129 131 133 135 137 139 ...
##  $ time   : int  0 0 0 0 0 10 10 10 10 10 ...
##  $ parent : Factor w/ 5 levels "atrazine","chloro",..: 4 4 4 4 4 4 4 4 4 4 ...
##  $ analyte: chr  "metolD" "metolD" "metolD" "metolD" ...
##  $ matrix : Factor w/ 3 levels "amphib","amphibi",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ species: Factor w/ 2 levels "BA","LF": 1 1 1 1 1 1 1 1 1 1 ...
##  $ conc   : num  2.932 0.348 0.747 1.458 0.842 ...
time <- dehyd.amphib.metol.metolD$time
conc <- dehyd.amphib.metol.metolD$conc
species <- dehyd.amphib.metol.metolD$species
plot(time, conc)

#only one species
metolD.lm <- lm(conc ~ time + species) # + species
summary(metolD.lm)
## 
## Call:
## lm(formula = conc ~ time + species)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.0449 -1.3831 -0.4867  0.9035 12.8923 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  3.39271    0.64057   5.296  1.6e-06 ***
## time        -0.14007    0.08999  -1.556    0.125    
## speciesLF    0.01743    0.61732   0.028    0.978    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.497 on 63 degrees of freedom
## Multiple R-squared:  0.03704,    Adjusted R-squared:  0.006471 
## F-statistic: 1.212 on 2 and 63 DF,  p-value: 0.3045

triadimefon.

print("triadimefon")
## [1] "triadimefon"
#View(dehyd.amphib.imid.imid)
str(dehyd.amphib.tdn.tdn)
## 'data.frame':    66 obs. of  7 variables:
##  $ time   : int  0 0 0 0 0 0 2 2 2 2 ...
##  $ parent : Factor w/ 5 levels "atrazine","chloro",..: 5 5 5 5 5 5 5 5 5 5 ...
##  $ analyte: Factor w/ 12 levels "atrazine","chloro",..: 12 12 12 12 12 12 12 12 12 12 ...
##  $ matrix : Factor w/ 3 levels "amphib","amphibi",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ species: Factor w/ 2 levels "BA","LF": 2 2 2 2 2 2 2 2 2 2 ...
##  $ conc   : num  0.931 1.471 0.829 0.834 0.623 ...
##  $ ID     : Factor w/ 600 levels "BA A 0-1","BA A 0-1 S1",..: 529 531 533 535 537 539 553 555 557 559 ...
time <- dehyd.amphib.tdn.tdn$time
conc <- dehyd.amphib.tdn.tdn$conc
species <- dehyd.amphib.tdn.tdn$species
plot(time, conc)

#only one species
tdn.lm <- lm(conc ~ time + species)
summary(tdn.lm)
## 
## Call:
## lm(formula = conc ~ time + species)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.5202 -0.2058 -0.0357  0.1276  2.5444 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.75465    0.10502   7.186 9.46e-10 ***
## time        -0.02040    0.01475  -1.383    0.172    
## speciesLF    0.03877    0.10120   0.383    0.703    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4094 on 63 degrees of freedom
## Multiple R-squared:  0.03164,    Adjusted R-squared:  0.000897 
## F-statistic: 1.029 on 2 and 63 DF,  p-value: 0.3632

triadimefonD.

print("triadimefonD")
## [1] "triadimefonD"
#View(dehyd.amphib.imid.imid)
str(dehyd.amphib.tdn.tdnD)
## 'data.frame':    66 obs. of  7 variables:
##  $ ID     : Factor w/ 600 levels "BA A 0-1","BA A 0-1 S1",..: 181 183 185 187 189 191 193 195 197 199 ...
##  $ time   : int  0 0 0 0 0 10 10 10 10 10 ...
##  $ parent : Factor w/ 5 levels "atrazine","chloro",..: 5 5 5 5 5 5 5 5 5 5 ...
##  $ analyte: chr  "tdnD" "tdnD" "tdnD" "tdnD" ...
##  $ matrix : Factor w/ 3 levels "amphib","amphibi",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ species: Factor w/ 2 levels "BA","LF": 1 1 1 1 1 1 1 1 1 1 ...
##  $ conc   : num  0.812 0.27 0.708 0.419 0.757 ...
time <- dehyd.amphib.tdn.tdnD$time
conc <- dehyd.amphib.tdn.tdnD$conc
species <- dehyd.amphib.tdn.tdnD$species
plot(time, conc)

#only one species
tdnD.lm <- lm(conc ~ time + species)
summary(tdnD.lm)
## 
## Call:
## lm(formula = conc ~ time + species)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.5979 -0.2327 -0.0441  0.1229  2.5902 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.868036   0.110342   7.867  6.1e-11 ***
## time        -0.023229   0.015502  -1.498    0.139    
## speciesLF   -0.006579   0.106337  -0.062    0.951    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4302 on 63 degrees of freedom
## Multiple R-squared:  0.03447,    Adjusted R-squared:  0.003821 
## F-statistic: 1.125 on 2 and 63 DF,  p-value: 0.3312

test everything together except chlorothalonil, but not summing metabolites

big_test <- rbind(dehyd.amphib.atrazine.atrazine, dehyd.amphib.imid.imid, dehyd.amphib.metol.metol, dehyd.amphib.tdn.tdn)
time <- big_test$time
conc <- big_test$conc
species <- big_test$species
pesticides <- big_test$analyte
plot(time, conc)

big_test.lm <- lm(conc ~ time + species + pesticides)
summary(big_test.lm)
## 
## Call:
## lm(formula = conc ~ time + species + pesticides)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5.3733 -1.2066 -0.1499  0.7245 15.4684 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      8.36983    0.50949  16.428  < 2e-16 ***
## time            -0.15516    0.05595  -2.773  0.00601 ** 
## speciesLF       -1.30534    0.41727  -3.128  0.00199 ** 
## pesticidesimid  -5.73684    0.63474  -9.038  < 2e-16 ***
## pesticidesmetol -4.18056    0.50893  -8.214 1.59e-14 ***
## pesticidestdn   -6.20822    0.50893 -12.199  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.924 on 228 degrees of freedom
## Multiple R-squared:  0.4692, Adjusted R-squared:  0.4576 
## F-statistic: 40.31 on 5 and 228 DF,  p-value: < 2.2e-16

test everything together, chloromet instead of chlorothalonil, this time summing metabolites

big_test <- rbind(dehyd.amphib.atrazine.atrazineD, dehyd.amphib.imid.imid, dehyd.amphib.metol.metolD, dehyd.amphib.tdn.tdnD, dehyd.amphib.chloro.chloromet)
time <- big_test$time
conc <- big_test$conc
species <- big_test$species
pesticides <- big_test$analyte
plot(time, conc)

big_testD.lm <- lm(conc ~ time + species + pesticides)
summary(big_testD.lm)
## 
## Call:
## lm(formula = conc ~ time + species + pesticides)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -10.1296  -1.5571  -0.0451   1.2329  24.8541 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          14.66438    0.69547   21.09  < 2e-16 ***
## time                 -0.19299    0.07176   -2.69  0.00757 ** 
## speciesLF            -2.51879    0.52471   -4.80 2.53e-06 ***
## pesticideschloromet -12.25257    0.73898  -16.58  < 2e-16 ***
## pesticidesimid      -10.62879    0.91133  -11.66  < 2e-16 ***
## pesticidesmetolD     -9.62368    0.73898  -13.02  < 2e-16 ***
## pesticidestdnD      -11.57725    0.73898  -15.67  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.245 on 293 degrees of freedom
## Multiple R-squared:  0.5808, Adjusted R-squared:  0.5722 
## F-statistic: 67.66 on 6 and 293 DF,  p-value: < 2.2e-16