Load Libraries
library(ezknitr)
library(knitr)
library(metafor)
library(doBy)
Clear environment
remove(list=ls())
Document settings
opts_chunk$set(fig.width = 6, fig.height = 4)
raw.data <- read.csv("data/workspace.csv")
data.reduced <- raw.data[,c(1:7,10:16,19:48)]
# take out three data points with information on control treatments only
data.reduced <- data.reduced[data.reduced$FID!=105 &
data.reduced$FID!=154 &
data.reduced$FID!=211,]
Table of all data
summaryBy(FID~Reference+ReferenceNumb+studyYear+State, data = data.reduced, FUN = length)
## Reference ReferenceNumb studyYear State FID.length
## 1 Allen ref 11 11 2010 MS 7
## 2 Allen ref 12 12 2010 MS 8
## 3 Allen ref 13 13 2011 MS 5
## 4 Allen ref 14 14 2011 MS 5
## 5 Delanely ref 28 28 2013 AL 2
## 6 Delaney et al ref 6 6 2010 AL 8
## 7 Delaney et al ref 8 8 2011 AL 12
## 8 Delaney ref 17 17 2010 AL 8
## 9 Delaney ref 24 24 2010 AL 8
## 10 Delaney ref 26 26 2013 AL 3
## 11 Delaney ref 27 27 2013 AL 2
## 12 Delaney ref 29 29 2013 AL 2
## 13 Delaney ref 30 30 2013 AL 9
## 14 Delaney ref 31 31 2013 AL 9
## 15 Delaney ref 32 32 2013 AL 4
## 16 Delaney ref 33 33 2013 AL 4
## 17 Delaney ref 34 34 2013 AL 12
## 18 Delaney ref 44 44 2009 AL 13
## 19 Douglas et al ref 65 65 2008 FL 18
## 20 Douglas et al ref 66 66 2008 FL 13
## 21 Douglas et al ref 67 67 2009 FL 11
## 22 Harmon ref 47 47 2006 FL 12
## 23 Kemerait et al ref 59 59 2006 GA 15
## 24 Kemerait et al ref 71 71 2005 GA 8
## 25 Kemerait ref 46 46 2006 GA 5
## 26 Kemerait ref 49 49 2006 GA 12
## 27 Kemerait ref 50 50 2006 GA 10
## 28 Kemerait ref 51 51 2006 GA 7
## 29 Lawrence et al ref 3 3 2007 AL 7
## 30 lawrence et al ref 4 4 2005 AL 6
## 31 Lawrence et al ref 53 53 2007 AL 6
## 32 Lawrence et al ref 55 55 2006 AL 10
## 33 Lawrence et al ref 62 62 2007 AL 7
## 34 Lawrence et al ref 68 68 2013 AL 5
## 35 Lawrence ref 16 16 2008 AL 13
## 36 Lawrence ref 18 18 2006 AL 3
## 37 Lawrence ref 21 21 2005 AL 6
## 38 Lawrence ref 22 22 2008 AL 9
## 39 Lawrence ref 41 41 2006 AL 11
## 40 Mueller et al ref 1 1 2007 FL 3
## 41 Mueller et al ref 63 63 2006 FL 6
## 42 Mueller et al ref 9 9 2007 FL 9
## 43 Mueller ref 36 36 2006 FL 23
## 44 Mueller ref 37 37 2006 FL 15
## 45 Mueller ref 38 38 2006 FL 6
## 46 Mueller ref 39 39 2006 FL 11
## 47 Mueller ref 40 40 2006 FL 4
## 48 Mueller ref 43 43 2006 GA 15
## 49 Mueller ref 45 45 2006 FL 17
## 50 O'Brien et al ref 69 69 2013 FL 13
## 51 O'Brien ref 25 25 2012 FL 7
## 52 Padgett et al ref 54 54 2007 LA 9
## 53 Padgett et al ref 72 72 2005 LA 15
## 54 Padgett et al ref 73 73 2005 LA 15
## 55 Price et al ref 35 35 2012 LA 12
## 56 Schneider et al ref 60 60 2006 LA 23
## 57 Sikora et al ref 7 7 2011 AL 4
## 58 Sikora et al ref 70 70 2005 AL 13
## 59 Sikora et al ref 74 74 2006 AL 12
## 60 Sikora ref 23 23 2007 AL 12
## 61 Sikora ref 42 42 2005 AL 7
#summaryBy(FID~ReferenceNumb+Reference+studyYear+State, data = data.reduced, FUN = length)
Active ingredients: define mixed and 2+ applications of mixed (if 2+ applications of same, just use that active ingredient as is.)
# Active ingredients - fix typos in original dataset
data.reduced$active.ingredient.coded <- as.character(data.reduced$active.ingredient.coded)
data.reduced$active.ingredient.coded[data.reduced$trade.name=="ACT Plus"] <- "oth"
data.reduced$active.ingredient.coded[data.reduced$trade.name=="Domark"] <- "tetra"
data.reduced$active.ingredient.coded[data.reduced$trade.name=="Folicur"] <- "tebu"
data.reduced$active.ingredient.coded[data.reduced$trade.name=="Folicur fb Headline"] <- "tebu + pyra"
data.reduced$active.ingredient.coded[data.reduced$trade.name=="Folicur + Headline"] <- "tebu + pyra"
data.reduced$active.ingredient.coded[data.reduced$trade.name=="Laredo"] <- "myc"
data.reduced$active.ingredient.coded[data.reduced$trade.name=="Punch fb Punch"] <- "flus"
data.reduced$active.ingredient.coded[data.reduced$trade.name=="Stratego"] <- "mixed"
# Active ingredients - new code for analysis (e.g. >5 obs)
# Start by making new field and storing the old code
data.reduced$activeIngClean <- "empty"
# Mixed
mixed.indices <- grep("+", data.reduced$active.ingredient.coded, fixed=TRUE)
data.reduced$activeIngClean[mixed.indices] <- "mixed"
# Dual applications
dual.apps <- grep("fb", data.reduced$active.ingredient.coded, fixed=TRUE)
data.reduced$activeIngClean[dual.apps] <- "dual"
data.reduced$activeIngClean[grep("azo fb azo", data.reduced$active.ingredient.coded, fixed=F)] <- "azo"
data.reduced$activeIngClean[grep("myc fb myc", data.reduced$active.ingredient.coded, fixed=T)] <- "myc"
data.reduced$activeIngClean[grep("tetr fb tetr", data.reduced$active.ingredient.coded, fixed=T)] <- "tetra"
data.reduced$activeIngClean[grep("tetra fb tetra", data.reduced$active.ingredient.coded, fixed=T)] <- "tetra"
data.reduced$activeIngClean[grep("tebu fb tebu", data.reduced$active.ingredient.coded, fixed=T)] <- "tebu"
data.reduced$activeIngClean[grep("prop fb prop", data.reduced$active.ingredient.coded, fixed=T)] <- "prop"
data.reduced$activeIngClean[grep("pyra fb pyra", data.reduced$active.ingredient.coded, fixed=T)] <- "pyra"
data.reduced$activeIngClean[grep("pyra fb prya", data.reduced$active.ingredient.coded, fixed=T)] <- "pyra"
data.reduced$activeIngClean[grep("flut fb flut", data.reduced$active.ingredient.coded, fixed=T)] <- "flut"
# Single applications
data.reduced$activeIngClean[data.reduced$activeIngClean=="empty"] <-
as.character(data.reduced$active.ingredient.coded[data.reduced$activeIngClean=="empty"])
# Clean up so labels are consistent (e.g., "pyr" vs "pyra")
data.reduced$activeIngClean[data.reduced$activeIngClean=="pyr"] <- "pyra"
data.reduced$activeIngClean[data.reduced$activeIngClean=="pyraclostrobin"] <- "pyra"
data.reduced$activeIngClean[data.reduced$activeIngClean=="pyro"] <- "pyra"
data.reduced$activeIngClean[data.reduced$activeIngClean=="teb"] <- "tebu"
data.reduced$activeIngClean[data.reduced$activeIngClean=="tetr"] <- "tetra"
data.reduced$activeIngClean[data.reduced$activeIngClean=="thi"] <- "thio"
data.reduced$activeIngClean[data.reduced$activeIngClean==""] <- "unknown"
data.reduced$activeIngClean[data.reduced$activeIngClean=="cyp"] <- "cypr"
data.reduced$activeIngClean[data.reduced$activeIngClean=="tebu "] <- "tebu"
# Check progress
table(data.reduced$activeIngClean)
##
## azo chlo cop cypr dual eth febu flus flut
## 29 2 2 6 44 2 1 8 66
## gly met mixed myc org oth pico prop prot
## 6 1 177 14 3 16 4 2 4
## pyra sul tebu tetra thio tria trif unknown
## 54 3 54 37 10 1 2 18
When sample size is < 5, make “oth”
less.than.five <- c("chlo", "cop", "eth", "febu", "met ", "org", "pico", "prop",
"prot", "sul", "tria", "trif", "unknown")
data.reduced$activeIngClean[data.reduced$activeIngClean %in% less.than.five] <- "oth"
# Check with table
table(data.reduced$activeIngClean)
##
## azo cypr dual flus flut gly mixed myc oth pyra tebu tetra
## 29 6 44 8 66 6 177 14 61 54 54 37
## thio
## 10
Class of fungicide: clean up labels to be consistent and if <5, relabel as “oth”
# Table to see how it looks as is
table(data.reduced$class.code)
##
## chloronitrile copper sulfate
## 1 2 1
## herbicide mancozeb metconazole
## 6 1 1
## mma myc other
## 220 2 31
## other strobilurin strobilurin
## 1 78 4
## strobulurin tebu thiophanate
## 8 1 9
## triaz+AL384:AM384ole triazole unknown
## 1 188 11
# Start with "empty"
data.reduced$classClean <- "empty"
# Clean up labels
data.reduced$classClean[data.reduced$class.code==""] <- "unknown"
data.reduced$classClean[data.reduced$class.code=="other "] <- "other"
data.reduced$classClean[data.reduced$class.code=="strobilurin "] <- "strobilurin"
data.reduced$classClean[data.reduced$class.code=="strobulurin"] <- "strobilurin"
data.reduced$classClean[data.reduced$class.code=="triaz+AL384:AM384ole"] <- "triazole"
# Fill in the rest
data.reduced$classClean[data.reduced$classClean=="empty"] <-
as.character(data.reduced$class.code[data.reduced$classClean=="empty"])
# Check with table
table(data.reduced$classClean)
##
## chloronitrile copper sulfate herbicide mancozeb metconazole
## 2 1 6 1 1
## mma myc other strobilurin tebu
## 220 2 32 90 1
## thiophanate triazole unknown
## 9 189 12
When sample size is < 5, make “oth”
less.than.five <- c("chloronitrile", "copper sulfate", "mancozeb", "metconazole",
"myc", "tebu", "unknown")
data.reduced$classClean[data.reduced$classClean %in% less.than.five] <- "other"
# Check with table
table(data.reduced$classClean)
##
## herbicide mma other strobilurin thiophanate triazole
## 6 220 52 90 9 189
Growth stages of application
# Examine original data
sort(table(data.reduced$Growth.stage.applied))
##
## 3,7 3fb6 r1 + r3 + r5
## 1 1 1
## r1 r3 r1, r3 r2,r10
## 1 1 1
## r2,r11 r2,r12 r2,r13
## 1 1 1
## r2,r14 r2,r15 r2,r4
## 1 1 1
## r2,r6 r2,r7 r2,r8
## 1 1 1
## r2,r9 r2+r10 r2+r11
## 1 1 1
## r2+r12 r2+r13 r2+r14
## 1 1 1
## r2+r3 r2+r4 r2+r5
## 1 1 1
## r2+r6 r2+r7 r2+r8
## 1 1 1
## r2+r9 r3 + r5 r3, r5
## 1 1 1
## r3.5, r5 r3+21d r3+28d
## 1 1 1
## r5,r5.5 v9,r1,r2,r3,r4,r5,r6,r7 1+5
## 1 1 2
## r1 fb r3 r2 + r5.5 r3 + r5
## 2 2 2
## r3 fb r5 r3, r5 r3+21 days
## 2 2 2
## r5 fb r5.5 v5,r1 v5+r2
## 2 2 2
## v5+r2+r4 3 fb 6 r1 + 14
## 2 3 3
## r1 + 21 r4,r6 3,6
## 3 3 4
## r1 + r3 r1, r1+ 21d r3, r3 + 21d
## 4 4 4
## r3.5,r5 r4,r5 R1
## 4 4 5
## R3 r3.5 R5
## 5 5 5
## r1+21d v5+r1+r2+r4+r5 r2 + r3 + r5
## 6 6 7
## r2,r5.5 r3+r5 3,5
## 8 8 9
## 5 r2+r4 or r5 r4
## 9 9 9
## 1+21d r1 + r4 r1,r3,r5
## 10 11 13
## r3,r5 r1 r2,r5
## 13 15 15
## r2 r2 + r4 r3 + r5
## 22 24 25
## r2 + r5 r5
## 27 37 61
## r3
## 109
data.reduced$growthStateClean <- "empty"
# Applied during R1 plus another stage
data.reduced$growthStateClean[grep("^1", data.reduced$Growth.stage.applied)] <- "1+"
data.reduced$growthStateClean[grep("^r1", data.reduced$Growth.stage.applied)] <- "1+"
# Applied during R1 only
data.reduced$growthStateClean[data.reduced$Growth.stage.applied=="1"|
data.reduced$Growth.stage.applied=="r1"|
data.reduced$Growth.stage.applied=="R1"] <- "1"
# Applied during R2 initially plus another stage
data.reduced$growthStateClean[grep("^r2", data.reduced$Growth.stage.applied)] <- "2+"
# Applied during R2 only
data.reduced$growthStateClean[data.reduced$Growth.stage.applied=="r2"] <- "2"
# Applied during R3 initially plus another stage
data.reduced$growthStateClean[grep("^3", data.reduced$Growth.stage.applied)] <- "3"
data.reduced$growthStateClean[grep("^r3", data.reduced$Growth.stage.applied)] <- "3"
# Applied during R3 only
data.reduced$growthStateClean[data.reduced$Growth.stage.applied=="r3"|
data.reduced$Growth.stage.applied=="R3"] <- "3"
# Applied during R4 initially plus another stage (none were 4 only)
data.reduced$growthStateClean[grep("^r4", data.reduced$Growth.stage.applied)] <- "4"
# Applied during R5
data.reduced$growthStateClean[grep("^r5", data.reduced$Growth.stage.applied)] <- "5"
data.reduced$growthStateClean[grep("^R5", data.reduced$Growth.stage.applied)] <- "5"
data.reduced$growthStateClean[grep("^5", data.reduced$Growth.stage.applied)] <- "5"
# Applied during V-stage
data.reduced$growthStateClean[grep("^v", data.reduced$Growth.stage.applied)] <- "V"
# Unknown stage of application
data.reduced$growthStateClean[data.reduced$growthStateClean=="empty"] <- "unknown"
# Check with table
#sort(table(data.reduced$Growth.stage.applied[data.reduced$growthStateClean=="empty"]))
table(data.reduced$growthStateClean)
##
## 1 1+ 2 2+ 3 4 5 unknown V
## 20 61 22 125 204 16 78 27 13
Number of applications
# Check with table
table(data.reduced$applicationsNumb)
##
## 1 2 3 5 8
## 282 254 23 6 1
When sample size is < 5, delete
data.reduced <- data.reduced[data.reduced$applicationsNumb!=8,]
Rust data
# Data that had rust severity in percentage originally
# Column #15 is rustSeverPerc
rust.perc.orig <- data.reduced[!is.na(data.reduced$rustSeverPerc),]
rust.perc.orig$scale <- "Percent"
# Data that had rust severity on scale originally
# Column #19 is rustSever1-8
rust.scale.orig <- data.reduced[!is.na(data.reduced$rustSever1.8),]
# Data from Lawrence references are actually on 0-10 Scale
scale.1to10.refs <- c(3,4,53,55,62,68,16,41)
rust.scale.orig$scale[rust.scale.orig$ReferenceNumb %in% scale.1to10.refs] <- "Scale 0-10"
# Rest are on 1-8 scale
rust.scale.orig$scale[!rust.scale.orig$ReferenceNumb %in% scale.1to10.refs] <- "Scale 0-8"
# Combine back together
rust.data <- rbind(rust.perc.orig, rust.scale.orig)
Yield data
# Data that had yield data
# Column #35 is yield
yield.data <- data.reduced[!is.na(data.reduced$yield),]
100sw data
# Data that had 100sw data
# Column #39 is 100sw
seedwt.data <- data.reduced[!is.na(data.reduced$seedWt),]
Cercospora data
# Data that had Cercospora data
cerco.data <- data.reduced[!is.na(data.reduced$CercoSever),]
# Define the scale used
cerco.data$scale <- "empty"
# Data from Padgett et al. studies used scale 0-10
cerco.data$scale[grep("^Pa", cerco.data$Reference)] <- "Scale 0-10"
# Data from Price et al. studies used scale 0-8
cerco.data$scale[grep("^Pr", cerco.data$Reference)] <- "Scale 0-8"
# Data from others used 0-5 scale
cerco.data$scale[cerco.data$scale=="empty"] <- "Scale 0-5"
Target spot data
# Data that had Target Spot data
target.spot.data <- data.reduced[!is.na(data.reduced$Tsseverity)|
!is.na(data.reduced$Tsincidence),]
# Define the scale used
target.spot.data$scale <- "empty"
# Percentage originally
target.spot.data$scale[target.spot.data$ReferenceNumb==55 |
target.spot.data$ReferenceNumb==21] <- "Percent"
# Data with scale 0-10
target.spot.data$scale[target.spot.data$ReferenceNumb==30] <- "Scale 0-10"
# Data with scale 0-5
target.spot.data$scale[target.spot.data$scale=="empty"] <- "Scale 0-5"
For rust severity on scale 0-8, convert to percent
For rust severity on scale 0-10, convert to percent
# For treatment groups
rust.data$m1i[rust.data$scale=="Scale 0-8" &
rust.data$rustSever1.8 <= 2] <-
rust.data$rustSever1.8[rust.data$scale=="Scale 0-8"&
rust.data$rustSever1.8 <= 2]*2.5
rust.data$m1i[rust.data$scale=="Scale 0-8" &
rust.data$rustSever1.8 > 2 &
rust.data$rustSever1.8 <= 4] <- 5 +
(rust.data$rustSever1.8[rust.data$scale=="Scale 0-8"&
rust.data$rustSever1.8 > 2 &
rust.data$rustSever1.8 <= 4]-2)*5
rust.data$m1i[rust.data$scale=="Scale 0-8" &
rust.data$rustSever1.8 > 4 &
rust.data$rustSever1.8 <= 6] <- 15 +
(rust.data$rustSever1.8[rust.data$scale=="Scale 0-8"&
rust.data$rustSever1.8 > 4 &
rust.data$rustSever1.8 <= 6]-4)*10
rust.data$m1i[rust.data$scale=="Scale 0-8" &
rust.data$rustSever1.8 > 6] <- 35 +
(rust.data$rustSever1.8[rust.data$scale=="Scale 0-8"&
rust.data$rustSever1.8 > 6]-6)*32.5
# For control groups
rust.data$m2i[rust.data$scale=="Scale 0-8" &
rust.data$rustSever1.8Cont <= 2] <-
rust.data$rustSever1.8Cont[rust.data$scale=="Scale 0-8"&
rust.data$rustSever1.8Cont <= 2]*2.5
rust.data$m2i[rust.data$scale=="Scale 0-8" &
rust.data$rustSever1.8Cont > 2 &
rust.data$rustSever1.8Cont <= 4] <- 5 +
(rust.data$rustSever1.8Cont[rust.data$scale=="Scale 0-8"&
rust.data$rustSever1.8Cont > 2 &
rust.data$rustSever1.8Cont <= 4]-2)*5
rust.data$m2i[rust.data$scale=="Scale 0-8" &
rust.data$rustSever1.8Cont > 4 &
rust.data$rustSever1.8Cont <= 6] <- 15 +
(rust.data$rustSever1.8Cont[rust.data$scale=="Scale 0-8"&
rust.data$rustSever1.8Cont > 4 &
rust.data$rustSever1.8Cont <= 6]-4)*10
rust.data$m2i[rust.data$scale=="Scale 0-8" &
rust.data$rustSever1.8Cont > 6] <- 35 +
(rust.data$rustSever1.8Cont[rust.data$scale=="Scale 0-8"&
rust.data$rustSever1.8Cont > 6]-6)*32.5
# For rust severity on 0-10 scale
rust.data$m1i[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8 <= 3] <-
rust.data$rustSever1.8[rust.data$scale=="Scale 0-10"&
rust.data$rustSever1.8 <= 3]*(2.5/3)
rust.data$m1i[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8 > 3 &
rust.data$rustSever1.8 <= 4] <- 2.5 +
(rust.data$rustSever1.8[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8 > 3 &
rust.data$rustSever1.8 <= 4]-3)*2.5
rust.data$m1i[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8 > 4 &
rust.data$rustSever1.8 <= 6] <- 5 +
(rust.data$rustSever1.8[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8 > 4 &
rust.data$rustSever1.8 <= 6]-4)*5
rust.data$m1i[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8 > 6 &
rust.data$rustSever1.8 <= 8] <- 15 +
(rust.data$rustSever1.8[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8 > 6 &
rust.data$rustSever1.8 <= 8]-6)*10
rust.data$m1i[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8 > 8] <- 35 +
(rust.data$rustSever1.8[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8 > 8]-8)*32.5
# Control
rust.data$m2i[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8Cont <= 3] <-
rust.data$rustSever1.8Cont[rust.data$scale=="Scale 0-10"&
rust.data$rustSever1.8Cont <= 3]*(2.5/3)
rust.data$m2i[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8Cont > 3 &
rust.data$rustSever1.8Cont <= 4] <- 2.5 +
(rust.data$rustSever1.8Cont[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8Cont > 3 &
rust.data$rustSever1.8Cont <= 4]-3)*2.5
rust.data$m2i[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8Cont > 4 &
rust.data$rustSever1.8Cont <= 6] <- 5 +
(rust.data$rustSever1.8Cont[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8Cont > 4 &
rust.data$rustSever1.8Cont <= 6]-4)*5
rust.data$m2i[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8Cont > 6 &
rust.data$rustSever1.8Cont <= 8] <- 15 +
(rust.data$rustSever1.8Cont[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8Cont > 6 &
rust.data$rustSever1.8Cont <= 8]-6)*10
rust.data$m2i[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8Cont > 8] <- 35 +
(rust.data$rustSever1.8Cont[rust.data$scale=="Scale 0-10" &
rust.data$rustSever1.8Cont > 8]-8)*32.5
# For rust severity in percent originally
rust.data$m1i[rust.data$scale=="Percent"] <- rust.data$rustSeverPerc[rust.data$scale=="Percent"]
rust.data$m2i[rust.data$scale=="Percent"] <- rust.data$rustSeverPercCont[rust.data$scale=="Percent"]
# Assume 20% as std deviation
rust.data$sd1i <- rust.data$sd2i <- 20
# Sample sizes
rust.data$n1i <- rust.data$n2i <- rust.data$replications
Yield data
yield.data$yield.kg.ha <- yield.data$yield*67.25 # convert to kg ha-1
yield.data$yieldCont.kg.ha <- yield.data$yieldCont*67.25 # convert to kg ha-1
# conversion info from https://www.extension.iastate.edu/agdm/wholefarm/html/c6-80.html
yield.data$m1i <- yield.data$yield.kg.ha # Yield for treatment group
yield.data$sd1i <- yield.data$yield.kg.ha*0.2 # Std is 20% of mean
yield.data$m2i <- yield.data$yieldCont.kg.ha # Yield for control group
yield.data$sd2i <- yield.data$yieldCont.kg.ha*0.2 # Std is 20% of the mean
yield.data$n1i <- yield.data$n2i <- yield.data$replications
100 seed weight data
seedwt.data$m1i <- seedwt.data$seedWt # Yield for treatment group
seedwt.data$sd1i <- seedwt.data$seedWt*0.2 # Std is 20% of mean
seedwt.data$m2i <- seedwt.data$seedWtCont # Yield for control group
seedwt.data$sd2i <- seedwt.data$seedWtCont*0.2 # Std is 20% of the mean
seedwt.data$n1i <- seedwt.data$n2i <- seedwt.data$replications
Cercospora data
# Scale 0-10
cerco.data$m1i[cerco.data$scale=="Scale 0-10"] <-
cerco.data$CercoSever[cerco.data$scale=="Scale 0-10"]*10
cerco.data$m2i[cerco.data$scale=="Scale 0-10"] <-
cerco.data$CercoSeverCont[cerco.data$scale=="Scale 0-10"]*10
# Scale 0-8
cerco.data$m1i[cerco.data$scale=="Scale 0-8" &
cerco.data$CercoSever <= 2] <-
cerco.data$CercoSever[cerco.data$scale=="Scale 0-8"&
cerco.data$CercoSever <= 2]*2.5
cerco.data$m1i[cerco.data$scale=="Scale 0-8" &
cerco.data$CercoSever > 2 &
cerco.data$CercoSever <= 4] <- 5 +
(cerco.data$CercoSever[cerco.data$scale=="Scale 0-8"&
cerco.data$CercoSever > 2 &
cerco.data$CercoSever <= 4]-2)*5
cerco.data$m1i[cerco.data$scale=="Scale 0-8" &
cerco.data$CercoSever > 4 &
cerco.data$CercoSever <= 6] <- 15 +
(cerco.data$CercoSever[cerco.data$scale=="Scale 0-8"&
cerco.data$CercoSever > 4 &
cerco.data$CercoSever <= 6]-4)*10
cerco.data$m1i[cerco.data$scale=="Scale 0-8" &
cerco.data$CercoSever > 6] <- 35 +
(cerco.data$CercoSever[cerco.data$scale=="Scale 0-8"&
cerco.data$CercoSever > 6]-6)*32.5
# Control
cerco.data$m2i[cerco.data$scale=="Scale 0-8" &
cerco.data$CercoSeverCont <= 2] <-
cerco.data$CercoSeverCont[cerco.data$scale=="Scale 0-8"&
cerco.data$CercoSeverCont <= 2]*2.5
cerco.data$m2i[cerco.data$scale=="Scale 0-8" &
cerco.data$CercoSeverCont > 2 &
cerco.data$CercoSeverCont <= 4] <- 5 +
(cerco.data$CercoSeverCont[cerco.data$scale=="Scale 0-8"&
cerco.data$CercoSeverCont > 2 &
cerco.data$CercoSeverCont <= 4]-2)*5
cerco.data$m2i[cerco.data$scale=="Scale 0-8" &
cerco.data$CercoSeverCont > 4 &
cerco.data$CercoSeverCont <= 6] <- 15 +
(cerco.data$CercoSeverCont[cerco.data$scale=="Scale 0-8"&
cerco.data$CercoSeverCont > 4 &
cerco.data$CercoSeverCont <= 6]-4)*10
cerco.data$m2i[cerco.data$scale=="Scale 0-8" &
cerco.data$CercoSeverCont > 6] <- 35 +
(cerco.data$CercoSeverCont[cerco.data$scale=="Scale 0-8"&
cerco.data$CercoSeverCont > 6]-6)*32.5
Scale 0-5
cerco.data$m1i[cerco.data$scale=="Scale 0-5" &
cerco.data$CercoSever <= 1] <-
cerco.data$CercoSever[cerco.data$scale=="Scale 0-5"&
cerco.data$CercoSever <= 1]*10
cerco.data$m1i[cerco.data$scale=="Scale 0-5" &
cerco.data$CercoSever > 1 &
cerco.data$CercoSever <= 2] <- 10 +
(cerco.data$CercoSever[cerco.data$scale=="Scale 0-5"&
cerco.data$CercoSever > 1 &
cerco.data$CercoSever <= 2]-1)*15
cerco.data$m1i[cerco.data$scale=="Scale 0-5" &
cerco.data$CercoSever > 2 ] <- 25 +
(cerco.data$CercoSever[cerco.data$scale=="Scale 0-5"&
cerco.data$CercoSever > 2]-2)*25
# Control
cerco.data$m2i[cerco.data$scale=="Scale 0-5" &
cerco.data$CercoSeverCont <= 1] <-
cerco.data$CercoSeverCont[cerco.data$scale=="Scale 0-5"&
cerco.data$CercoSeverCont <= 1]*10
cerco.data$m2i[cerco.data$scale=="Scale 0-5" &
cerco.data$CercoSeverCont > 1 &
cerco.data$CercoSeverCont <= 2] <- 10 +
(cerco.data$CercoSeverCont[cerco.data$scale=="Scale 0-5"&
cerco.data$CercoSeverCont > 1 &
cerco.data$CercoSeverCont <= 2]-1)*15
cerco.data$m2i[cerco.data$scale=="Scale 0-5" &
cerco.data$CercoSeverCont > 2 ] <- 25 +
(cerco.data$CercoSeverCont[cerco.data$scale=="Scale 0-5"&
cerco.data$CercoSeverCont > 2]-2)*25
# SD and replications
cerco.data$sd1i <- cerco.data$sd2i <- 20
cerco.data$n1i <- cerco.data$n2i <- cerco.data$replications
Target spot data
# Scale 0-10
target.spot.data$m1i[target.spot.data$scale=="Scale 0-10"] <-
target.spot.data$Tsseverity[target.spot.data$scale=="Scale 0-10"]*10
target.spot.data$m2i[target.spot.data$scale=="Scale 0-10"] <-
target.spot.data$TSseverityCont[target.spot.data$scale=="Scale 0-10"]*10
# Percentage
target.spot.data$m1i[target.spot.data$scale=="Percent"] <-
target.spot.data$Tsincidence[target.spot.data$scale=="Percent"]
target.spot.data$m2i[target.spot.data$scale=="Percent"] <-
target.spot.data$TSincidenceCont[target.spot.data$scale=="Percent"]
# Scale 0-5
target.spot.data$m1i[target.spot.data$scale=="Scale 0-5" &
target.spot.data$Tsseverity <= 1] <-
target.spot.data$Tsseverity[target.spot.data$scale=="Scale 0-5"&
target.spot.data$Tsseverity <= 1]*10
target.spot.data$m1i[target.spot.data$scale=="Scale 0-5" &
target.spot.data$Tsseverity > 1 &
target.spot.data$Tsseverity <= 2] <- 10 +
(target.spot.data$Tsseverity[target.spot.data$scale=="Scale 0-5"&
target.spot.data$Tsseverity > 1 &
target.spot.data$Tsseverity <= 2]-1)*15
target.spot.data$m1i[target.spot.data$scale=="Scale 0-5" &
target.spot.data$Tsseverity > 2 ] <- 25 +
(target.spot.data$Tsseverity[target.spot.data$scale=="Scale 0-5"&
target.spot.data$Tsseverity > 2]-2)*25
# Control
target.spot.data$m2i[target.spot.data$scale=="Scale 0-5" &
target.spot.data$TSseverityCont <= 1] <-
target.spot.data$TSseverityCont[target.spot.data$scale=="Scale 0-5"&
target.spot.data$TSseverityCont <= 1]*10
target.spot.data$m2i[target.spot.data$scale=="Scale 0-5" &
target.spot.data$TSseverityCont > 1 &
target.spot.data$TSseverityCont <= 2] <- 10 +
(target.spot.data$TSseverityCont[target.spot.data$scale=="Scale 0-5"&
target.spot.data$TSseverityCont > 1 &
target.spot.data$TSseverityCont <= 2]-1)*15
target.spot.data$m2i[target.spot.data$scale=="Scale 0-5" &
target.spot.data$TSseverityCont > 2 ] <- 25 +
(target.spot.data$TSseverityCont[target.spot.data$scale=="Scale 0-5"&
target.spot.data$TSseverityCont > 2]-2)*25
# SD and replications
target.spot.data$sd1i <- target.spot.data$sd2i <- 20
target.spot.data$n1i <- target.spot.data$n2i <- target.spot.data$replications
Rust data
# Active ingredients
sort(table(rust.data$activeIngClean))
##
## cypr myc thio azo gly flus tetra dual pyra tebu oth flut
## 2 4 5 6 6 7 10 15 25 31 37 44
## mixed
## 132
small.ing <- c("cypr", "myc")
rust.data$activeIngClean[rust.data$activeIngClean %in% small.ing] <- "oth"
table(rust.data$activeIngClean)
##
## azo dual flus flut gly mixed oth pyra tebu tetra thio
## 6 15 7 44 6 132 43 25 31 10 5
# Class
sort(table(rust.data$classClean))
##
## thiophanate herbicide strobilurin other triazole mma
## 4 6 32 34 102 146
rust.data$classClean[rust.data$classClean=="thiophanate"] <- "other"
table(rust.data$classClean)
##
## herbicide mma other strobilurin triazole
## 6 146 38 32 102
# R-stage
sort(table(rust.data$growthStateClean))
##
## 2 V 1 4 unknown 5 1+ 2+ 3
## 8 10 11 16 18 27 51 75 108
# Applications
sort(table(rust.data$applicationsNumb))
##
## 5 3 1 2
## 6 15 133 170
Yield data
# Applications
sort(table(yield.data$applicationsNumb))
##
## 5 3 2 1
## 3 22 241 254
yield.data <- yield.data[yield.data$applicationsNumb!=5,]
# R-stage
sort(table(yield.data$growthStateClean))
##
## V 4 1 2 unknown 1+ 5 2+ 3
## 4 16 17 22 23 57 63 123 192
yield.data <- yield.data[yield.data$growthStateClean!="V",]
# Active ingredients
sort(table(yield.data$activeIngClean))
##
## gly cypr flus thio myc azo tetra dual pyra tebu oth flut
## 2 6 7 10 11 27 35 42 46 48 52 63
## mixed
## 164
yield.data$activeIngClean[yield.data$activeIngClean=="gly"] <- "oth"
sort(table(yield.data$activeIngClean))
##
## cypr flus thio myc azo tetra dual pyra tebu oth flut mixed
## 6 7 10 11 27 35 42 46 48 54 63 164
# Class
sort(table(yield.data$classClean))
##
## herbicide thiophanate other strobilurin triazole mma
## 2 9 43 79 175 205
yield.data$classClean[yield.data$classClean=="herbicide"] <- "other"
sort(table(yield.data$classClean))
##
## thiophanate other strobilurin triazole mma
## 9 45 79 175 205
100-seed weight data
# Applications and growth stage
sort(table(seedwt.data$applicationsNumb))
##
## 3 2 1
## 1 91 120
sort(table(seedwt.data$growthStateClean))
##
## 1 unknown 5 4 2 1+ 2+ 3
## 4 9 15 16 21 23 44 80
seedwt.data <- seedwt.data[seedwt.data$applicationsNumb!=3 &
seedwt.data$growthStateClean!=1,]
# Active ingredients
sort(table(seedwt.data$activeIngClean))
##
## gly thio cypr myc dual azo oth tetra pyra tebu flut mixed
## 2 2 3 3 4 9 14 17 19 19 42 73
small.ing.100 <- c("gly", "thio" ,"cypr", "myc", "dual")
seedwt.data$activeIngClean[seedwt.data$activeIngClean %in% small.ing.100] <- "oth"
sort(table(seedwt.data$activeIngClean))
##
## azo tetra pyra tebu oth flut mixed
## 9 17 19 19 28 42 73
# Class
sort(table(seedwt.data$classClean))
##
## herbicide thiophanate other strobilurin mma triazole
## 2 2 12 24 78 89
small.class.100 <- c("herbicide", "thiophanate")
seedwt.data$classClean[seedwt.data$classClean %in% small.class.100] <- "other"
sort(table(seedwt.data$classClean))
##
## other strobilurin mma triazole
## 16 24 78 89
Overall means (raw mean difference)
rust.data.MD <- escalc(measure = "MD", m1i = m1i, m2i = m2i,
sd1i = sd1i, sd2i = sd2i, n1i = n1i, n2i = n2i,
data = rust.data)
yield.data.MD <- escalc(measure = "MD", m1i = m1i, m2i = m2i,
sd1i = sd1i, sd2i = sd2i, n1i = n1i, n2i = n2i,
data = yield.data)
seedwt.data.MD <- escalc(measure = "MD", m1i = m1i, m2i = m2i,
sd1i = sd1i, sd2i = sd2i, n1i = n1i, n2i = n2i,
data = seedwt.data)
cerco.data.MD <- escalc(measure = "MD", m1i = m1i, m2i = m2i,
sd1i = sd1i, sd2i = sd2i, n1i = n1i, n2i = n2i,
data = cerco.data)
target.spot.data.MD <- escalc(measure = "MD", m1i = m1i, m2i = m2i,
sd1i = sd1i, sd2i = sd2i, n1i = n1i, n2i = n2i,
data = target.spot.data)
Standardized mean difference
rust.data.SMD <- escalc(measure = "SMD", m1i = m1i, m2i = m2i,
sd1i = sd1i, sd2i = sd2i, n1i = n1i, n2i = n2i,
data = rust.data)
yield.data.SMD <- escalc(measure = "SMD", m1i = m1i, m2i = m2i,
sd1i = sd1i, sd2i = sd2i, n1i = n1i, n2i = n2i,
data = yield.data)
seedwt.data.SMD <- escalc(measure = "SMD", m1i = m1i, m2i = m2i,
sd1i = sd1i, sd2i = sd2i, n1i = n1i, n2i = n2i,
data = seedwt.data)
save(rust.data.SMD, yield.data.SMD, seedwt.data.SMD,
rust.data.MD, yield.data.MD, seedwt.data.MD,
cerco.data.MD, target.spot.data.MD,
file="data/output_data/data_cleaned.R")
Spun with ezspin(“programs/data_processing.R”, out_dir=“output”, fig_dir=“figures”, keep_md=FALSE)
Session Info:
sessionInfo()
## R version 3.3.0 (2016-05-03)
## Platform: x86_64-apple-darwin13.4.0 (64-bit)
## Running under: OS X 10.10.5 (Yosemite)
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] doBy_4.5-15 metafor_1.9-8 Matrix_1.2-6 knitr_1.13 ezknitr_0.4
##
## loaded via a namespace (and not attached):
## [1] MASS_7.3-45 magrittr_1.5 formatR_1.4
## [4] tools_3.3.0 stringi_1.1.1 R.methodsS3_1.7.1
## [7] grid_3.3.0 stringr_1.0.0 R.utils_2.3.0
## [10] evaluate_0.9 R.oo_1.20.0 lattice_0.20-33