Qaecologist Posts http://feed.informer.com/digests/T57DVXB9YH/feeder Qaecologist Posts Respective post owners and feed distributors Mon, 15 Feb 2016 08:40:04 +0000 Feed Informer http://feed.informer.com/ Aloha Surveillance https://mickresearch.wordpress.com/2026/06/16/aloha-surveillance/ Michael McCarthy's Research urn:uuid:a051c91c-4655-a022-4ba0-4871344dd1e0 Tue, 16 Jun 2026 03:11:51 +0000 Here is some information and code that we&#8217;ll be using at a workshop session that I will run at a Biosecurity conference at the University of Hawaii.The workshop will be based on the optimization of surveillance by Hauser and McCarthy &#8230; <a href="https://mickresearch.wordpress.com/2026/06/16/aloha-surveillance/">Continue reading <span class="meta-nav">&#8594;</span></a> <p class="wp-block-paragraph">Here is some information and code that we&#8217;ll be using at a workshop session that I will run at a Biosecurity conference at the University of Hawaii.<br>The workshop will be based on the optimization of surveillance by Hauser and McCarthy (2009, Ecology Letters): <br><a href="https://doi.org/10.1111/j.1461-0248.2009.01323.x" rel="nofollow">https://doi.org/10.1111/j.1461-0248.2009.01323.x</a><br><br>We&#8217;ll look at a two things:<br>1) data on detection times of people searching for green golf tees embedded in the South Lawn at the University of Melbourne; and<br>2) optimal allocation of search effort for orange hawkweeds in the Bogong High Plains, drawing on the illustrative case study in Hauser and McCarthy (2009).<br><br>Here are the hawkweed data as an Excel file (you will need to open the file in Excel and save it as a csv file because WordPress seems to block me from uploading a csv file).</p> <div class="wp-block-file"><a id="wp-block-file--media-4c64b564-62ae-4717-ad03-a2bbb50354db" href="https://mickresearch.wordpress.com/wp-content/uploads/2026/06/hawkweeddata.xlsx">HawkweedData</a><a href="https://mickresearch.wordpress.com/wp-content/uploads/2026/06/hawkweeddata.xlsx" class="wp-block-file__button wp-element-button" download aria-describedby="wp-block-file--media-4c64b564-62ae-4717-ad03-a2bbb50354db">Download</a></div> <p class="wp-block-paragraph">If opening the Excel file and saving it as a csv file is painful, try accessing the csv file from my google drive: <a href="https://drive.google.com/file/d/10NaZ0y3u-SC_CNVzwjwzpedZ_soaNDAp/view?usp=sharing" target="_blank" rel="noopener">https://drive.google.com/file/d/10NaZ0y3u-SC_CNVzwjwzpedZ_soaNDAp/view?usp=sharing</a></p> <p class="wp-block-paragraph">Below is the R code we will use.</p> <p class="wp-block-paragraph">First, we define a function that optimises detections.</p> <div class="wp-block-code"> <div class="cm-editor"> <div class="cm-scroller"> <pre> <code class="language-html"><div class="cm-line">opteffort <span class="tok-punctuation">&lt;</span>- function(pvals, lam, B)</div><div class="cm-line">{</div><div class="cm-line"> # optimises effort to each site, where pvals is a vector of probabilities of occurrence</div><div class="cm-line"> # (or number of targets) at sites, lam is the rate of detection and B is the budget of effort</div><div class="cm-line"> # The objective function is Sum[pvals*exp(-lam*effort)]</div><div class="cm-line"> # From Hauser and McCarthy (2009) - https://doi.org/10.1111/j.1461-0248.2009.01323.x</div><div class="cm-line"> </div><div class="cm-line"> nsites <span class="tok-punctuation">&lt;</span>- length(pvals) # number of sites available to survey</div><div class="cm-line"> # prioritise sites by the derivative at effort = 0, which equals pvals*lam</div><div class="cm-line"> # we first target sites with a better return on investment</div><div class="cm-line"> deriv <span class="tok-punctuation">&lt;</span>- pvals*lam</div><div class="cm-line"> ind <span class="tok-punctuation">&lt;</span>- order(deriv, decreasing=TRUE) # store the id of sites ordered by the derivatives</div><div class="cm-line"> optv <span class="tok-punctuation">&lt;</span>- rep(NA, nsites) # to store the optimal effort</div><div class="cm-line"> pord <span class="tok-punctuation">&lt;</span>- rep(NA, nsites) # to store the ordered pvals</div><div class="cm-line"> </div><div class="cm-line"> pord <span class="tok-punctuation">&lt;</span>- pvals[ind] # the ordered pvals</div><div class="cm-line"> dord <span class="tok-punctuation">&lt;</span>- deriv[ind] # the ordered values of pvals*lam</div><div class="cm-line"> lord <span class="tok-punctuation">&lt;</span>- lam[ind] # the ordered values of lam</div><div class="cm-line"> rlam <span class="tok-punctuation">&lt;</span>- 1/lord # reciprocal of lam values</div><div class="cm-line"> lp <span class="tok-punctuation">&lt;</span>- log(pord)</div><div class="cm-line"> ld <span class="tok-punctuation">&lt;</span>- log(dord)</div><div class="cm-line"> </div><div class="cm-line"> optsites <span class="tok-punctuation">&lt;</span>- 1 # start with evaluating only survey the 1 site</div><div class="cm-line"> v <span class="tok-punctuation">&lt;</span>- rep(0, nsites) # all sites have effort = 0</div><div class="cm-line"> v[1] <span class="tok-punctuation">&lt;</span>- B # except the number 1 priority site, which has all the effort</div><div class="cm-line"></div><div class="cm-line"> optv[ind] <span class="tok-punctuation">&lt;</span>- v # store that allocation, sorted by the original order of sites</div><div class="cm-line"> </div><div class="cm-line"> while(optsites<span class="tok-punctuation">&lt;</span><span class="tok-typeName">nsites</span><span class="tok-propertyName">)</span> <span class="tok-propertyName">#</span> <span class="tok-propertyName">now,</span> <span class="tok-propertyName">potentially</span> <span class="tok-propertyName">iterate</span> <span class="tok-propertyName">up</span> <span class="tok-propertyName">to</span> <span class="tok-propertyName">all</span> <span class="tok-propertyName">possible</span> <span class="tok-propertyName">sites</span></div><div class="cm-line"> <span class="tok-propertyName">{</span></div><div class="cm-line"> <span class="tok-propertyName">optsites</span> &lt;<span class="tok-propertyName">-</span> <span class="tok-propertyName">optsites+1</span></div><div class="cm-line"></div><div class="cm-line"> <span class="tok-propertyName">vbar</span> &lt;<span class="tok-propertyName">-</span> <span class="tok-propertyName">(sum(ld[1:optsites]</span>/lord[1:optsites]))/optsites</div><div class="cm-line"> harml <span class="tok-punctuation">&lt;</span>- optsites / sum(rlam[1:optsites])</div><div class="cm-line"> for(i in 1:optsites)</div><div class="cm-line"> {</div><div class="cm-line"> v[i] <span class="tok-punctuation">&lt;</span>- ld[i]/lord[i] + (harml/lord[i])*(B/optsites - vbar)</div><div class="cm-line"> }</div><div class="cm-line"> </div><div class="cm-line"> if(v[optsites] &lt; 0) # if it is infeasible, then the previous iteration was optimal</div><div class="cm-line"> {</div><div class="cm-line"> return(optv) # use the previous iteration</div><div class="cm-line"> }</div><div class="cm-line"> optv[ind] <span class="tok-punctuation">&lt;</span>- v # store the allocation, ordered by the input sites</div><div class="cm-line"> }</div><div class="cm-line"> return(optv) # the best solution</div><div class="cm-line">}</div><div class="cm-line"></div><div class="cm-line"></div><div class="cm-line"></div></code></pre> </div> </div> </div> <p class="wp-block-paragraph">Let&#8217;s use that code to explore optimal solutions for different probabilities of occurrence (or number of targets), different detection rates, and different budgets.</p> <p class="wp-block-paragraph">Investigate how changing the number of targets at a site influences the optimal allocation of effort to that site.</p> <p class="wp-block-paragraph"><br>Investigate how changing the rate of detection at a site influences the optimal allocation of effort to that site.</p> <div class="wp-block-code"> <div class="cm-editor"> <div class="cm-scroller"> <pre> <code><div class="cm-line"># For example, let&apos;s assume a particular budget B, detection rate lambda, and set of sites with occupancy p</div><div class="cm-line">p &lt;- c(30, 15, 5)</div><div class="cm-line">lambda &lt;- rep(0.25, length(p)) # detection rate per target (per minute)</div><div class="cm-line">B &lt;- 10 # budget of 10 minutes</div><div class="cm-line">opteff &lt;- opteffort(p, lambda, B) # calculate the optimal effort</div><div class="cm-line">opteff</div><div class="cm-line"># Check that the derivatives are equal at each site with survey effort&gt;0</div><div class="cm-line"># The derivatives are p*lambda*exp(-lambda*opteff)</div><div class="cm-line"># Multiply by (effort&gt;0) (TRUE/FALSE) so the result for sites with effort=0 are set to zero</div><div class="cm-line"># so that they are easier to spot in the output.</div><div class="cm-line">p*lambda*exp(-lambda*opteff) * (opteff&gt;0)</div><div class="cm-line"></div><div class="cm-line"></div></code></pre> </div> </div> </div> <p class="wp-block-paragraph">Now we can look at some data of times to detection of targets by 15 searchers of 3 different quadrat. One quadrat had 30 targets, one had 15 and the third quadrat had 5 targets (these were green golf tees embedded in a lawn).</p> <p class="wp-block-paragraph">First we&#8217;ll look at whether the number of undetected targets conformed with a negative exponential function. If we plot the proportion of targets that remain undetected over time on a log scale versus the time of the search, then the relationship will be linear if the function is an exponential. How did this do?</p> <div class="wp-block-code"> <div class="cm-editor"> <div class="cm-scroller"> <pre> <code><div class="cm-line"># now we&apos;ll look at some data on times to detection in three types of quadrats</div><div class="cm-line"># quadrats with 5, 15 and 30 targets</div><div class="cm-line">times5 &lt;- matrix(</div><div class="cm-line"> c(</div><div class="cm-line"> 0.25, 0.033333333, 0.016666667, 0.583333333, 0.783333333, 0.35,</div><div class="cm-line"> 1.633333333, 0.866666667, 2.7, 0.716666667, 0.733333333, 0.05,</div><div class="cm-line"> 0.383333333, 0.366666667, 1.633333333,</div><div class="cm-line"> </div><div class="cm-line"> 0.383333333, 0.5, 0.15, 1.3, 1.216666667, 0.516666667,</div><div class="cm-line"> 1.85, 1.433333333, 2.8, 2.083333333, 1.466666667, 0.4,</div><div class="cm-line"> 0.5, 0.65, 2,</div><div class="cm-line"> </div><div class="cm-line"> 0.766666667, 2.033333333, 1.1, 2.933333333, 3.366666667,</div><div class="cm-line"> 0.583333333, 2.466666667, 4.083333333, 7.233333333,</div><div class="cm-line"> 5.466666667, 3.683333333, 2.066666667, 1.283333333,</div><div class="cm-line"> 3.333333333, 2.75,</div><div class="cm-line"> </div><div class="cm-line"> 1.133333333, 4.7, 2.666666667, 3.45, 6.583333333, 3.2,</div><div class="cm-line"> 6.183333333, 5.083333333, NaN, 6.183333333, 4.983333333,</div><div class="cm-line"> 3.083333333, 3.4, 3.833333333, 8.95,</div><div class="cm-line"> </div><div class="cm-line"> 1.366666667, NaN, NaN, 4.05, NaN, NaN,</div><div class="cm-line"> NaN, 5.383333333, NaN, 7.466666667, NaN,</div><div class="cm-line"> 9.433333333, NaN, NaN, NaN</div><div class="cm-line"> ),</div><div class="cm-line"> nrow = 5,</div><div class="cm-line"> byrow = TRUE</div><div class="cm-line">)</div><div class="cm-line"></div><div class="cm-line">times15 &lt;- matrix(</div><div class="cm-line"> c(</div><div class="cm-line"> 0.1, 0.05, 0.033333333, 0.566666667, 0.05, 0.066666667, 0.033333333, 0.1, 0.866666667, 1.6, 0.233333333, 0.033333333, 0.033333333, 0.15, 1.066666667,</div><div class="cm-line"> 0.283333333, 0.333333333, 0.15, 0.633333333, 0.35, 0.2, 0.283333333, 0.483333333, 1.016666667, 2.083333333, 0.466666667, 0.266666667, 0.233333333, 0.45, 1.483333333,</div><div class="cm-line"> 0.616666667, 0.383333333, 0.366666667, 0.866666667, 0.616666667, 0.483333333, 0.483333333, 1.083333333, 1.1, 2.133333333, 0.566666667, 0.966666667, 0.666666667, 1.733333333, 1.533333333,</div><div class="cm-line"> 0.666666667, 0.733333333, 0.45, 1.066666667, 1.583333333, 0.9, 0.516666667, 1.333333333, 1.55, 2.25, 1.016666667, 1.416666667, 0.866666667, 2.5, 1.65,</div><div class="cm-line"> 0.883333333, 1, 0.516666667, 1.283333333, 2.133333333, 1.1, 0.933333333, 1.616666667, 1.85, 3.133333333, 1.35, 1.6, 1.2, 2.766666667, 2.2,</div><div class="cm-line"> 1.366666667, 1.033333333, 0.716666667, 1.366666667, 4.5, 1.183333333, 1, 1.766666667, 2.033333333, 3.2, 1.483333333, 1.7, 1.4, 5.666666667, 2.366666667,</div><div class="cm-line"> 1.433333333, 1.066666667, 0.966666667, 2.4, 4.85, 1.45, 1.133333333, 2.266666667, 2.283333333, 5.35, 1.566666667, 1.983333333, 1.583333333, 6.783333333, 2.466666667,</div><div class="cm-line"> 1.783333333, 1.15, 1, 2.566666667, NaN, 1.716666667, 1.15, 3.016666667, 2.466666667, 5.633333333, 1.683333333, 2.216666667, 1.75, 7.366666667, 2.5,</div><div class="cm-line"> 1.833333333, 1.35, 1.166666667, 3.55, NaN, 1.983333333, 1.166666667, 3.366666667, 2.65, 6.283333333, 1.916666667, 2.333333333, 1.783333333, 8.366666667, 2.833333333,</div><div class="cm-line"> 2.066666667, 1.55, 1.583333333, 3.75, NaN, 2.383333333, 1.316666667, 3.633333333, 3.216666667, 7, 2.7, 2.466666667, 1.85, 9.25, 3.133333333,</div><div class="cm-line"> 2.3, 1.616666667, 1.766666667, 4.366666667, NaN, 4.1, 1.383333333, 4.05, 3.816666667, 8.05, 2.866666667, 2.666666667, 1.916666667, 9.366666667, 4.883333333,</div><div class="cm-line"> 2.366666667, 1.766666667, 1.916666667, 4.55, NaN, 5.583333333, 1.683333333, 4.283333333, 6, 8.166666667, 3.166666667, 2.866666667, 2.233333333, NaN, 4.916666667,</div><div class="cm-line"> 2.7, 2.416666667, 2.1, 5, NaN, 5.75, 1.85, 5.233333333, 6.533333333, 8.55, 3.65, 3.4, 2.283333333, NaN, 5.983333333,</div><div class="cm-line"> NaN, 3.133333333, 2.3, 6.95, NaN, 8.75, 1.95, 7.983333333, 6.55, NaN, 3.833333333, 7.833333333, 2.85, NaN, 6.233333333,</div><div class="cm-line"> NaN, 9.3, 6, NaN, NaN, NaN, 2.066666667, 8.5, NaN, NaN, 4.633333333, NaN, 5.466666667, NaN, NaN</div><div class="cm-line"> ),</div><div class="cm-line"> nrow = 15,</div><div class="cm-line"> byrow = TRUE</div><div class="cm-line">)</div><div class="cm-line"></div><div class="cm-line">times30 &lt;- matrix(</div><div class="cm-line"> c(</div><div class="cm-line"> 0.083333333, 0.25, 0.033333333, 0.566666667, 0.25, 0.05, 0.083333333, 0.05, 0.033333333, 0.15, 0.583333333, 0.183333333, 0.05, 1.65, 0.466666667,</div><div class="cm-line"> 0.116666667, 0.316666667, 0.083333333, 1.05, 0.316666667, 0.3, 0.116666667, 0.116666667, 0.166666667, 0.366666667, 0.883333333, 0.216666667, 0.083333333, 3.183333333, 0.516666667,</div><div class="cm-line"> 0.166666667, 0.733333333, 0.15, 1.216666667, 0.383333333, 0.333333333, 0.4, 0.283333333, 0.266666667, 1.05, 0.983333333, 0.35, 0.183333333, 4.033333333, 0.666666667,</div><div class="cm-line"> 0.366666667, 1.05, 0.35, 1.316666667, 0.533333333, 0.333333333, 0.55, 0.583333333, 0.366666667, 1.183333333, 1.233333333, 0.416666667, 0.3, 4.3, 0.733333333,</div><div class="cm-line"> 0.533333333, 1.15, 0.35, 1.483333333, 0.633333333, 0.483333333, 0.633333333, 0.666666667, 0.366666667, 1.666666667, 1.433333333, 0.45, 0.65, 4.5, 0.8,</div><div class="cm-line"> 0.583333333, 1.533333333, 0.483333333, 1.85, 0.733333333, 0.55, 0.75, 0.733333333, 0.416666667, 1.783333333, 1.9, 0.55, 0.666666667, 4.866666667, 1,</div><div class="cm-line"> 0.8, 1.616666667, 0.65, 1.983333333, 0.85, 0.633333333, 0.85, 0.916666667, 0.65, 1.883333333, 2.016666667, 0.683333333, 0.8, 5.366666667, 1.066666667,</div><div class="cm-line"> 0.833333333, 1.8, 0.7, 2.266666667, 1.05, 0.683333333, 0.916666667, 0.95, 0.75, 2.083333333, 2.183333333, 0.716666667, 0.85, 5.583333333, 1.133333333,</div><div class="cm-line"> 0.85, 2, 0.85, 2.483333333, 1.183333333, 0.966666667, 0.983333333, 1.133333333, 0.933333333, 2.15, 2.516666667, 1.016666667, 1, 5.683333333, 1.333333333,</div><div class="cm-line"> 1.016666667, 2.3, 0.966666667, 2.566666667, 1.55, 1.166666667, 1.166666667, 1.616666667, 1.066666667, 2.4, 2.933333333, 1.433333333, 1.033333333, 5.7, 1.416666667,</div><div class="cm-line"> 1.1, 2.383333333, 1.033333333, 2.716666667, 1.666666667, 1.416666667, 1.5, 1.616666667, 1.166666667, 2.616666667, 3.016666667, 1.466666667, 3.216666667, 5.716666667, 1.566666667,</div><div class="cm-line"> 1.183333333, 2.433333333, 1.116666667, 2.766666667, 1.733333333, 1.55, 1.583333333, 1.866666667, 1.266666667, 2.933333333, 3.166666667, 1.533333333, 4.2, 6.466666667, 1.616666667,</div><div class="cm-line"> 1.2, 2.683333333, 1.133333333, 2.866666667, 1.8, 1.65, 2.5, 1.95, 1.366666667, 3.1, 3.616666667, 1.616666667, 4.283333333, 6.733333333, 1.716666667,</div><div class="cm-line"> 1.333333333, 2.816666667, 1.25, 3.166666667, 1.916666667, 1.733333333, 2.666666667, 1.95, 1.416666667, 3.183333333, 3.816666667, 2.15, 4.5, 6.766666667, 1.85,</div><div class="cm-line"> 1.383333333, 2.933333333, 1.333333333, 3.25, 2.1, 1.816666667, 3.383333333, 2.083333333, 1.45, 4.25, 3.966666667, 2.383333333, 4.816666667, 6.8, 1.933333333,</div><div class="cm-line"> 1.5, 2.966666667, 1.5, 3.316666667, 2.183333333, 1.95, NaN, 2.133333333, 1.566666667, 4.483333333, 4.05, 2.4, 5.016666667, 6.9, 2.15,</div><div class="cm-line"> 1.55, 3, 1.6, 3.533333333, 2.3, 2.083333333, NaN, 2.283333333, 1.633333333, 4.55, 4.283333333, 2.5, 5.383333333, 6.933333333, 2.383333333,</div><div class="cm-line"> 1.616666667, 3.033333333, 1.733333333, 3.583333333, 2.516666667, 2.2, NaN, 2.283333333, 1.683333333, 4.766666667, 4.75, 2.583333333, 5.65, 7.166666667, 2.716666667,</div><div class="cm-line"> 2.066666667, 3.083333333, 1.816666667, 3.783333333, 2.583333333, 2.283333333, NaN, 2.466666667, 1.833333333, 4.816666667, 4.866666667, 2.7, 6.883333333, 7.25, 2.8,</div><div class="cm-line"> 2.216666667, 3.116666667, 1.95, 3.883333333, 2.666666667, 2.416666667, NaN, 2.466666667, 2.016666667, 4.916666667, 5, 2.933333333, 7.383333333, 7.516666667, 2.883333333,</div><div class="cm-line"> 2.283333333, 3.3, 2.05, 3.95, 3.016666667, 2.483333333, NaN, 2.566666667, 2.283333333, 5.583333333, 5.266666667, 3.016666667, 8.166666667, 7.566666667, 2.916666667,</div><div class="cm-line"> 2.716666667, 3.8, 2.2, 4.066666667, 3.1, 2.566666667, NaN, 2.75, 2.35, 5.933333333, 5.35, 3.066666667, 8.2, 7.8, 4.733333333,</div><div class="cm-line"> 4.683333333, 5.066666667, 2.3, 4.316666667, 3.233333333, 2.65, NaN, 2.816666667, 3.483333333, 6.316666667, 5.716666667, 3.116666667, 9.133333333, 8.15, 4.9,</div><div class="cm-line"> 6.566666667, 5.616666667, 2.416666667, 4.383333333, 3.35, 2.8, NaN, 2.883333333, 4, 6.383333333, 5.85, 3.216666667, NaN, 8.183333333, 5.5,</div><div class="cm-line"> NaN, 5.666666667, 2.433333333, 4.866666667, 4.9, 2.866666667, NaN, 2.916666667, 4.116666667, 6.983333333, 5.916666667, 3.416666667, NaN, 8.9, 6.966666667,</div><div class="cm-line"> NaN, 6.4, 3.216666667, 4.9, 5.933333333, 2.933333333, NaN, 3, 5.15, 7.433333333, 6.15, 3.516666667, NaN, 9.033333333, 8,</div><div class="cm-line"> NaN, 8.05, 4.866666667, 4.95, 7.25, 3.883333333, NaN, 3.183333333, 5.866666667, 7.533333333, 6.45, 3.7, NaN, 9.716666667, NaN,</div><div class="cm-line"> NaN, 9.166666667, 4.883333333, 5.116666667, 8.616666667, 4.716666667, NaN, 3.266666667, 6.083333333, NaN, 7.05, 3.75, NaN, 9.816666667, NaN,</div><div class="cm-line"> NaN, NaN, NaN, 5.216666667, NaN, 6.166666667, NaN, 3.366666667, NaN, NaN, 7.133333333, 3.85, NaN, 9.85, NaN,</div><div class="cm-line"> NaN, NaN, NaN, NaN, NaN, NaN, NaN, 9, NaN, NaN, 7.233333333, 7.166666667, NaN, NaN, NaN </div><div class="cm-line"> ) </div><div class="cm-line"> ,</div><div class="cm-line"> nrow = 30,</div><div class="cm-line"> byrow = TRUE</div><div class="cm-line">) </div><div class="cm-line"></div><div class="cm-line"># look at what fraction of the targets have been detected at 1 minute intervals</div><div class="cm-line">prop5 &lt;- numeric(11) # proportion undetected in 5-target quadrats</div><div class="cm-line">prop15 &lt;- numeric(11) # proportion undetected in 15-target quadrats</div><div class="cm-line">prop30 &lt;- numeric(11) # proportion undetected in 30-target quadrats</div><div class="cm-line">predicted &lt;- numeric(11) # theoretical prediction</div><div class="cm-line"></div><div class="cm-line">for (i in 0:10) {</div><div class="cm-line"> prop5[i + 1] &lt;- 1 - sum(times5 &lt; i, na.rm = TRUE) / (5 * 15)</div><div class="cm-line"> prop15[i + 1] &lt;- 1 - sum(times15 &lt; i, na.rm = TRUE) / (15 * 15)</div><div class="cm-line"> prop30[i + 1] &lt;- 1 - sum(times30 &lt; i, na.rm = TRUE) / (30 * 15)</div><div class="cm-line"> </div><div class="cm-line"> predicted[i + 1] &lt;- exp(-0.25 * i)</div><div class="cm-line">}</div><div class="cm-line"></div><div class="cm-line"># A log-linear plot for the exponential function will be linear</div><div class="cm-line"># How well do the exponential functions represent the data?</div><div class="cm-line">plot(</div><div class="cm-line"> 0:10, prop5,</div><div class="cm-line"> log = &quot;y&quot;,</div><div class="cm-line"> pch = 16,</div><div class="cm-line"> col = &quot;green&quot;,</div><div class="cm-line"> xlab = &quot;Time searching (minutes)&quot;,</div><div class="cm-line"> ylab = &quot;Proportion undetected&quot;,</div><div class="cm-line"> ylim = range(c(prop5, prop15, prop30, predicted), na.rm = TRUE)</div><div class="cm-line">)</div><div class="cm-line"></div><div class="cm-line">points(0:10, prop15, pch = 16, col = &quot;blue&quot;)</div><div class="cm-line">points(0:10, prop30, pch = 16, col = &quot;purple&quot;)</div><div class="cm-line">lines(0:10, predicted, col = &quot;black&quot;, lwd = 2)</div><div class="cm-line"></div><div class="cm-line">legend(</div><div class="cm-line"> &quot;topright&quot;,</div><div class="cm-line"> legend = c(</div><div class="cm-line"> &quot;5-target quadrats&quot;,</div><div class="cm-line"> &quot;15-target quadrats&quot;,</div><div class="cm-line"> &quot;30-target quadrats&quot;,</div><div class="cm-line"> &quot;predicted&quot;</div><div class="cm-line"> ),</div><div class="cm-line"> col = c(&quot;green&quot;, New website! https://cbakerresearch.wordpress.com/2023/08/13/new-website/ Chris Baker urn:uuid:e1ecf3d7-f7cf-823e-790c-d5387f315b56 Sun, 13 Aug 2023 03:23:55 +0000 This website has fallen out of date. Head to https://ms.unimelb.edu.au/research/groups/mathematical-ecology-epidemiology-and-biosecurity <p>This website has fallen out of date. Head to <a href="https://ms.unimelb.edu.au/research/groups/mathematical-ecology-epidemiology-and-biosecurity#home">https://ms.unimelb.edu.au/research/groups/mathematical-ecology-epidemiology-and-biosecurity</a> </p> Environmental Science and ARC Future Fellowships https://mickresearch.wordpress.com/2022/09/14/environmental-science-and-arc-future-fellowships/ Michael McCarthy's Research urn:uuid:866733cb-9d7e-f542-f81a-b5746bb9cadd Tue, 13 Sep 2022 21:16:24 +0000 Environmental Science is one if Australia&#8217;s leading research areas. It is a field with Australia&#8217;s highest representation of highly-cited authors. And for all the foibles of the Excellence in Research for Australia (ERA) ratings, it is the field with the &#8230; <a href="https://mickresearch.wordpress.com/2022/09/14/environmental-science-and-arc-future-fellowships/">Continue reading <span class="meta-nav">&#8594;</span></a> <p>Environmental Science is one if <a rel="noreferrer noopener" href="https://mickresearch.wordpress.com/2015/12/04/ecology-and-environmental-sciences-star-in-era15/" target="_blank">Australia&#8217;s leading research areas</a>. It is a field with Australia&#8217;s highest representation of highly-cited authors. And for all the foibles of the Excellence in Research for Australia (ERA) ratings, it is the field with the most universities &#8220;well above world standard&#8221; (<a rel="noreferrer noopener" href="https://dataportal.arc.gov.au/era/web/outcomes#/for/05" target="_blank">ERA 2018</a>).</p> <p>Australia&#8217;s environment is clearly important &#8211; to things like our national identity, our health and wellbeing, and some of our main industries (e.g., agriculture, tourism). The state of Australia&#8217;s environment, however, <a rel="noreferrer noopener" href="https://soe.dcceew.gov.au/" target="_blank">is poor</a>. </p> <p>&#8220;Environmental change&#8221; is also recognised as a national &#8220;Science and Research Priority&#8221; by the Australian government.</p> <p>So given that background, you might expect that the Australian Research Council (ARC) would prioritize funding for Environmental Science. </p> <p>Of the 100 ARC Future Fellowships recently awarded, only one was in the area of Environmental Science (congratulations to Vanessa Adams &#8211; excellent stuff). This is no anomaly. In the last 5 years, out of more than 500 Future Fellowships awarded, only 12 have been in the area of Environmental Science.</p> <p>Plot the number of Future Fellowships versus the number of universities judged to be &#8220;well-above world standard&#8221; and there are some clear outliers.</p> <figure class="wp-block-image size-large"><a href="https://mickresearch.files.wordpress.com/2022/09/image.png"><img data-attachment-id="2885" data-permalink="https://mickresearch.wordpress.com/2022/09/14/environmental-science-and-arc-future-fellowships/image-12/" data-orig-file="https://mickresearch.files.wordpress.com/2022/09/image.png" data-orig-size="944,543" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image" data-image-description="" data-image-caption="" data-medium-file="https://mickresearch.files.wordpress.com/2022/09/image.png?w=300" data-large-file="https://mickresearch.files.wordpress.com/2022/09/image.png?w=640" src="https://mickresearch.files.wordpress.com/2022/09/image.png?w=944" alt="" class="wp-image-2885" srcset="https://mickresearch.files.wordpress.com/2022/09/image.png 944w, https://mickresearch.files.wordpress.com/2022/09/image.png?w=150 150w, https://mickresearch.files.wordpress.com/2022/09/image.png?w=300 300w, https://mickresearch.files.wordpress.com/2022/09/image.png?w=768 768w" sizes="(max-width: 944px) 100vw, 944px" /></a><figcaption class="wp-element-caption">The number of ARC Future Fellowships awarded in different disciplines between 2018 and 2022 versus the number of Australian universities judged to be well above world (ERA 2018).</figcaption></figure> <p>On the positive side, Engineering seems to be getting a very large share of the Fellowships. The reason for this is unclear, but it seems to be an ARC priority.</p> <p>Biological Sciences also might seem disproportionately over-represented. Countering that view, Medical and Health Sciences is very much lower. The latter is expected since the ARC does not fund &#8220;medical research&#8221;, so many of Australia&#8217;s large population of top medical researchers are likely applying for (and being awarded) Future Fellowships in areas of Biological Sciences.</p> <p>Mathematical Sciences and Agricultural and Veterinary Sciences are also somewhat under-represented.</p> <p>But the biggest outlier? Environmental Sciences. Twenty one Australian universities were rated as being well above world standard in 2018 by the ARC, yet this field has only received 12 Future Fellowships in the 5 years since then. I have no idea why, but it seems very odd.</p> Big news!  https://joselahozresearch.wordpress.com/2022/09/03/big-news/ José J. Lahoz-Monfort urn:uuid:a24804e9-cf89-7e25-6128-7953a4f6bbb1 Fri, 02 Sep 2022 16:27:41 +0000 Since February 2022, I am working in Spain, at the Pyrenean Institute of Ecology (IPE-CSIC). I will update my website soon. <p>Since February 2022, I am working in Spain, at the Pyrenean Institute of Ecology (IPE-CSIC). I will update my website soon.</p> How I’ll watch the 2022 Australian Federal election https://mickresearch.wordpress.com/2022/05/18/how-ill-watch-the-2022-australian-federal-election/ Michael McCarthy's Research urn:uuid:19c78740-d5ea-7c1e-ad41-bf985b5e8779 Wed, 18 May 2022 07:37:07 +0000 With a few days to go until ballots begin to be counted in the 2022 Australian federal election, I thought I’d give an overview of some of the things I’ll be tracking on Saturday once counting starts. In addition to &#8230; <a href="https://mickresearch.wordpress.com/2022/05/18/how-ill-watch-the-2022-australian-federal-election/">Continue reading <span class="meta-nav">&#8594;</span></a> <p>With a few days to go until ballots begin to be counted in the 2022 Australian federal election, I thought I’d give an overview of some of the things I’ll be tracking on Saturday once counting starts. In addition to watching Antony Green on the ABC and keeping an eye on Kevin Bonham&#8217;s <a rel="noreferrer noopener" href="https://twitter.com/kevinbonham" target="_blank">twitter feed</a> and <a rel="noreferrer noopener" href="https://kevinbonham.blogspot.com/" target="_blank">blog</a>, I&#8217;ll be watching the AEC website and its booth-by-booth data. Here&#8217;s why&#8230;</p> <p>My interest in analysing election results was born in <a rel="noreferrer noopener" href="https://mickresearch.wordpress.com/2013/09/12/the-election-in-indi-indivotes/" target="_blank">the contest between Sophie Mirabella and Cathy McGowan in Indi</a> in 2013. Cathy McGowan would have been described as a “teal” candidate in today’s terms, even though her campaign brand was orange. McGowan presented as an economically conservative yet socially progressive candidate in a similar way to today’s teal candidates.</p> <p>Here are the things to keep an eye on:</p> <ol type="1"><li>The overall margin that the sitting member had at the last election based on the two-candidate-preferred vote.</li><li>First preferences, particularly swings on a booth-by-booth basis.</li><li>Flows of preferences, leading to two-candidate preferred votes, and the swing of that.</li></ol> <p>The current Australian Treasurer’s seat of Kooyong is a good example. Let’s look at that seat, where Josh Frydenberg is facing a challenge from the teal candidate Monique Ryan.</p> <p><em>The 2019 result</em></p> <p>Frydenberg <a href="https://results.aec.gov.au/24310/Website/HouseDivisionPage-24310-221.htm" target="_blank" rel="noreferrer noopener">won that seat in 2019</a> with 55.7% of the vote on a two-candidate-preferred basis (2CP). He beat Julian Burnside, a Greens candidate who got 45.3% of the 2CP vote. Therefore, Frydenberg cannot afford to lose 6% of the 2CP vote if he is to retain the seat in 2022.</p> <p>There are approximately 100,000 voters in Kooyong, so a 6% swing represents about 6000 votes.</p> <p>In 2019, Frydenberg won 49.4% of first preferences, so he gained a little over 6% on top of his first preference votes once distributing preferences allocated by primary voters of other candidates. In contrast, Burnside won only 21.2% of first preferences, so he more than doubled his vote via the flow of preferences. Preferences matter.</p> <p>It is interesting to see where the preferences came from. Frydenberg primarily got preferences from voters whose first preferences were Jana Stewart (ALP candidate; 2770 votes), Oliver Yates (an independent; 1793 votes), and Steven D’Elia (United Australia Party (936 votes). He got a little over 700 votes from three other candidates (two independents and an Animal Justice Party candidate).</p> <p>You might be surprised that Frydenberg got so many preferences from ALP voters. The reason was the number of ALP voters. Jana Stewart won 16666 first-preference votes, and Frydenberg got 16.6% of these via preferences. So he got a relatively small proportion of relatively large number of votes.</p> <p>Similarly, Oliver Yates netted a healthy number of first-preference votes (8890), but Frydenberg won only a small fraction of those (20.1%). Oliver Yates ran on a platform that very much reflects the current teal mood (a revolt against the direction of the Liberal Party, and demanding stronger climate action).</p> <p>In contrast, preferences from primary voters for the UAP candidate flowed strongly to Frydenberg (79%).</p> <p>If we add the first-preferences for the Greens, ALP, and Oliver Yates in 2019, then we have quite a strong block of potential votes for Monique Ryan in 2022 (47%). Clearly, Monique Ryan can’t be sure of winning all those first preference votes from 2019 (either as first preferences or on preferences ahead of Frydenberg). But given she has a chance of also taking some first-preference votes directly from Frydenberg, then Ryan seems clearly in the running.</p> <p><em>First preferences in 2022</em></p> <p>So I initially will be looking at Frydenberg’s first preference votes in 2022. The 2CP votes are what really matters, but first preference votes are normally reported before the 2CP counts. In 2019, Frydenberg’s first preference vote fell 8% but his 2CP fell by only 6%. But a drop in his first preference vote of around 6-8% in 2022 will worry him.</p> <p>One key when looking at the swing in votes is to realise that the vote differs between booths. In particularly, pre-poll votes and postal votes have tended to favour Frydenberg in the past. The votes counted on Saturday evening will tend to be the votes from regular booths. So Frydenberg might suffer an apparent swing against him on Saturday evening, but some of that swing will likely be recovered in the following days as more pre-poll and postal votes are counted.</p> <p>But any swing against him on regular votes will tend to be replicated across booths. You can see that in the 2019 result.</p> <figure class="wp-block-image size-large"><a href="https://mickresearch.files.wordpress.com/2022/05/kooyongswing2019.jpg"><img data-attachment-id="2879" data-permalink="https://mickresearch.wordpress.com/2022/05/18/how-ill-watch-the-2022-australian-federal-election/kooyongswing2019/" data-orig-file="https://mickresearch.files.wordpress.com/2022/05/kooyongswing2019.jpg" data-orig-size="480,288" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="kooyongswing2019" data-image-description="" data-image-caption="" data-medium-file="https://mickresearch.files.wordpress.com/2022/05/kooyongswing2019.jpg?w=300" data-large-file="https://mickresearch.files.wordpress.com/2022/05/kooyongswing2019.jpg?w=480" src="https://mickresearch.files.wordpress.com/2022/05/kooyongswing2019.jpg?w=480" alt="" class="wp-image-2879" srcset="https://mickresearch.files.wordpress.com/2022/05/kooyongswing2019.jpg 480w, https://mickresearch.files.wordpress.com/2022/05/kooyongswing2019.jpg?w=150 150w, https://mickresearch.files.wordpress.com/2022/05/kooyongswing2019.jpg?w=300 300w" sizes="(max-width: 480px) 100vw, 480px" /></a><figcaption>Swing to Frydenberg in the 2019 compared to 2016 for each booth versus the total votes per booth. The negative values are swings against Frydenberg. The only seat with a positive swing was a small “hospital” booth (a team that collects ballots from hospitals). You can see that the swings for the non-ordinary votes (orange circles, including pre-poll, absent and postal votes) were similar to the average overall swing. Once we have swings for 10-15 larger booths, we’ll have a good idea about where the seat is heading.</figcaption></figure> <p> So, I will be looking at the swings of individual booths. If those swings on first preferences average greater than 6%, then the result becomes interesting. I would guess if the average swing on first preferences is greater than 10% then Frydenberg will lose his seat, unless the UAP or some other right-leaning candidate is picking up a large fraction of those first-preference votes.</p> <p><em>Preference flows</em></p> <p>If the AEC starts publishing 2CP counts for individual booths along with the first preference counts, then it is possible to estimate the preference flows via linear regression. If those data become available, here is <a href="https://mickresearch.wordpress.com/2016/06/30/election-fever-hits-again/" target="_blank" rel="noreferrer noopener">the approach I will use</a>. The y-variable would be the number of 2CP that Frydenberg gains in each booth. The x-variables will be the first preference votes to each candidate. The regression coefficients will estimate the proportion of voters for each candidate who preference Frydenberg above Ryan. The coefficient for Frydenberg will be set to 1 (we know that his voters have all preferenced Frydenberg above Ryan). For the others, the coefficients will be restricted to between 0 and 1, and I will use the booth-by-booth data to estimate the coefficients (0 means none of those voters preferenced Frydenberg; 1 means they all preferenced Frydenberg). That will allow me to estimate the 2CP vote in booths that have reported first preference votes but not 2CP votes.</p> <p>So there you have it. First, I will look at the swing needed to unseat the sitting member. I’ll monitor the swing of first preferences and then project how that swing will translate to the 2CP vote (either guessing based on previous years or a linear model based on booth data). That will allow me to predict the final 2CP vote for the whole electorate once the first preference votes become available. It would be possible to do a similar analysis for all the seats that are in play. This analysis relies on the AEC reporting booth-by-booth results on election night. Hopefully they will!</p>