<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>plant disease epidemiology on Bhim Chaulagain</title><link>https://bhimchaulagain.netlify.app/tags/plant-disease-epidemiology/</link><description>Recent content in plant disease epidemiology on Bhim Chaulagain</description><generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator><language>en-us</language><copyright>B. Chaulagain {year}</copyright><lastBuildDate>Mon, 08 Jul 2019 21:13:14 -0500</lastBuildDate><atom:link href="https://bhimchaulagain.netlify.app/tags/plant-disease-epidemiology/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Calculate Area Under Disease Gradient (AUDG) in R</title><link>https://bhimchaulagain.netlify.app/post/2015-07-23-audg_calculation/</link><pubDate>Mon, 08 Jul 2019 21:13:14 -0500</pubDate><guid>https://bhimchaulagain.netlify.app/post/2015-07-23-audg_calculation/</guid><description>&lt;p>Disease gradient analysis is commonly used in plant disease epidemiology to quantify the spatial distribution of disease intensity relative to the inoculum source or disease focus. One useful summary metric is the Area Under the Disease Gradient (AUDG) curve, which allows quantitative comparison of disease spread among treatments, environments, or management scenarios.&lt;/p>
&lt;p>In this post, I demonstrate how to calculate AUDG in R and how the metric can be used to compare spatial epidemic development across multiple conditions.&lt;/p>
&lt;p>I am using &lt;a href="https://gist.github.com/stevenworthington/">Steven Worthington&lt;/a>&amp;rsquo;s ipak function to install and load several packages in R.&lt;/p>
&lt;pre>&lt;code class="language-r">ipak &amp;lt;- function(pkg){
new.pkg &amp;lt;- pkg[!(pkg %in% installed.packages()[, &amp;quot;Package&amp;quot;])]
if (length(new.pkg))
install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}
# usage
packages &amp;lt;- c(&amp;quot;tidyverse&amp;quot;, &amp;quot;readxl&amp;quot;, &amp;quot;agricolae&amp;quot;, &amp;quot;ggpubr&amp;quot;, &amp;quot;ggpubr&amp;quot;, &amp;quot;magrittr&amp;quot;, &amp;quot;reshape&amp;quot;, &amp;quot;knitr&amp;quot;)
ipak(packages)
data &amp;lt;- read_excel(&amp;quot;field observation.xlsx&amp;quot;) %&amp;gt;%
as.data.frame()
head(data, 10)
audpc_data &amp;lt;- data %&amp;gt;%
melt(id=c(&amp;quot;Distance&amp;quot;, &amp;quot;Treatments&amp;quot;)) %&amp;gt;%
group_by(Treatments, variable) %&amp;gt;%
summarize(AUDPC = audpc(value, Distance))
audpc_data %&amp;gt;%
spread(variable, AUDPC) %&amp;gt;%
arrange(Treatments) %&amp;gt;%
kable()
plot_graph &amp;lt;- ggplot(audpc_data, aes(Treatments, AUDPC))+
geom_boxplot(aes(fill=factor(Treatments))) +
ggtitle(&amp;quot;AUDPC&amp;quot;)+
xlab(&amp;quot;Treatment Applied&amp;quot;)+
ylab(&amp;quot;Area Under Disease Gradient&amp;quot;)+
theme_bw(base_size = 14)+
theme(aspect.ratio=1.25,plot.title = element_text(hjust = 0.5),
panel.grid=element_blank())+
scale_fill_manual(name=&amp;quot;Treatments&amp;quot;,
breaks = c(&amp;quot;T1&amp;quot;, &amp;quot;T2&amp;quot;,
&amp;quot;T3&amp;quot;, &amp;quot;T4&amp;quot;, &amp;quot;T5&amp;quot;,
&amp;quot;T6&amp;quot;, &amp;quot;T7&amp;quot;),
labels=c(&amp;quot;T1=Inoculated control&amp;quot;, &amp;quot;T2=CP culling at 3 days&amp;quot;, &amp;quot;T3=CP cull 'ring' x 3&amp;quot;,&amp;quot;T4=CP cull at 1 day&amp;quot;,&amp;quot;T5=FP of CP at 3 days&amp;quot;,&amp;quot;T6=CP cull + FP of non-CP&amp;quot;,&amp;quot;T7=FP of entire plot at 3 days&amp;quot;),
values=c(&amp;quot;#999999&amp;quot;,&amp;quot;#E69F00&amp;quot;,&amp;quot;#56B4E9&amp;quot;, &amp;quot;#009E73&amp;quot;, &amp;quot;#F0E442&amp;quot;, &amp;quot;#0072B2&amp;quot;, &amp;quot;#D55E00&amp;quot;))
plot_graph
ggsave(filename = &amp;quot;Boxplot.png&amp;quot;, width = , height = , units = &amp;quot;in&amp;quot;,
dpi = 600, limitsize = TRUE)
&lt;/code>&lt;/pre>
&lt;p>&lt;img src="Boxplot.png" alt="AUDG boxplot">&lt;/p></description></item></channel></rss>