<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/october-grant-proposal-season/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://freakonometrics.hypotheses.org/55580"> R-english – Freakonometrics</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>In 2012, Danielle Herbert, Adrian Barnett, Philip Clarke and Nicholas Graves published an article entitled “<cite></cite><a rel="nofollow" href="https://bmjopen.bmj.com/content/3/5/e002800" target="_blank"><em>on the time spent preparing grant proposals: an observational study of Australian researchers</em></a><cite></cite>“, whose conclusions had been included in Nature under a more explicit title, “<a rel="nofollow" href="https://www.nature.com/articles/495314d" target="_blank"><em>Australia’s grant system wastes time</em></a>” ! In this study, they included 3700 grant applications sent to the National Health and Medical Research Council, and showed that each application represented 37 working days: “<em>Extrapolating this to all 3,727 submitted proposals gives an estimated 550 working years of researchers’ time (95% confidence interval, 513-589)</em>“. But in these times when I have to write my funding application, I find that losing 37 days of work is huge. Because it’s become the norm! And somehow, it’s sad.</p>
<p><img src="https://i2.wp.com/freakonometrics.hypotheses.org/files/2018/10/Capture-d%E2%80%99e%CC%81cran-2018-10-09-a%CC%80-19.49.37.png?resize=260%2C347&ssl=1" alt="" width="260" data-recalc-dims="1" height="347"></p>
<p>Forget about the crazy idea that I would rather, in fact, spend more time doing my research. In fact, the thought I had this morning was that it is rather sad that in the Faculty of Science, mathematicians are asked to spend a considerable amount of time, comparable to that required of physicists or chemists, for often smaller amounts of funding… And I thought it could be easily verified. We start by retrieving the discipline codes</p>
<div><table><tr><td><pre>1
2
3
4
5
6
7
8
</pre></td><td><pre><span>url</span><span>=</span><span>&quot;http://www.nserc-crsng.gc.ca/NSERC-CRSNG/FundingDecisions-DecisionsFinancement/ResearchGrants-SubventionsDeRecherche/ResultsGSC-ResultatsCSS_eng.asp&quot;</span>
<span>download.<span>file</span></span><span>(</span><span>url</span>,destfile <span>=</span> <span>&quot;GSC.html&quot;</span><span>)</span>
<span>library</span><span>(</span>XML<span>)</span>
tables<span>=</span>readHTMLTable<span>(</span><span>&quot;GSC.html&quot;</span><span>)</span>
GSC<span>=</span>tables<span>[</span><span>[</span><span>1</span><span>]</span><span>]</span>$V1
GSC<span>=</span><span>as.<span>character</span></span><span>(</span>GSC<span>[</span><span>-</span><span>(</span><span>1</span><span>:</span><span>2</span><span>)</span><span>]</span><span>)</span>
namesGSC<span>=</span>tables<span>[</span><span>[</span><span>1</span><span>]</span><span>]</span>$V2
namesGSC<span>=</span><span>as.<span>character</span></span><span>(</span>namesGSC<span>[</span><span>-</span><span>(</span><span>1</span><span>:</span><span>2</span><span>)</span><span>]</span><span>)</span></pre></td></tr></table></div>
<p>We’re going to need a small function, to remove the $ and other symbols that pollute the data (and prevent them from being treated as numbers)</p>
<div><table><tr><td><pre>1
2
</pre></td><td><pre><span>library</span><span>(</span>stringr<span>)</span>
Correction <span>=</span> <span>function</span><span>(</span>x<span>)</span> <span>as.<span>numeric</span></span><span>(</span><span>gsub</span><span>(</span><span>'[$,]'</span>, <span>''</span>, x<span>)</span><span>)</span></pre></td></tr></table></div>
<p>We will now read the 12 pages, and harvest (we will just take the 2017 data, but we could go back a few years before)</p>
<div><table><tr><td><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td><pre>grants<span>=</span> <span>function</span><span>(</span>gsc<span>)</span><span>{</span>
     <span>url</span><span>=</span><span>paste</span><span>(</span><span>&quot;http://www.nserc-crsng.gc.ca/NSERC-CRSNG/FundingDecisions-DecisionsFinancement/ResearchGrants-SubventionsDeRecherche/ResultsGSCDetail-ResultatsCSSDetails_eng.asp?Year=2017&amp;amp;GSC=&quot;</span>,gsc,sep<span>=</span><span>&quot;&quot;</span><span>)</span>
    <span>download.<span>file</span></span><span>(</span><span>url</span>,destfile <span>=</span> <span>&quot;GSC.html&quot;</span><span>)</span>
    <span>library</span><span>(</span>XML<span>)</span>
    tables<span>=</span>readHTMLTable<span>(</span><span>&quot;GSC.html&quot;</span><span>)</span>
    X<span>=</span><span>as.<span>character</span></span><span>(</span>tables<span>[</span><span>[</span><span>1</span><span>]</span><span>]</span>$<span>&quot;Awarded Amount&quot;</span><span>)</span>
    A<span>=</span><span>as.<span>numeric</span></span><span>(</span><span>Vectorize</span><span>(</span>Correction<span>)</span><span>(</span>X<span>)</span><span>)</span>
<span>return</span><span>(</span><span>c</span><span>(</span><span>median</span><span>(</span>A<span>)</span>,<span>mean</span><span>(</span>A<span>)</span>,<span>as.<span>numeric</span></span><span>(</span><span>quantile</span><span>(</span>A,<span>(</span><span>1</span><span>:</span><span>99</span><span>)</span><span>/</span><span>100</span><span>)</span><span>)</span><span>)</span><span>)</span>
<span>}</span>
M<span>=</span><span>Vectorize</span><span>(</span>grants<span>)</span><span>(</span>GSC<span>[</span><span>1</span><span>:</span><span>12</span><span>]</span><span>)</span></pre></td></tr></table></div>
<p>The average amounts of individual grants can be compared,</p>
<div><table><tr><td><pre>1
</pre></td><td><pre><span>barplot</span><span>(</span>M<span>[</span><span>2</span>,<span>]</span><span>)</span></pre></td></tr></table></div>
<p><img alt="" src="https://i2.wp.com/freakonometrics.hypotheses.org/files/2018/10/moy3.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>In mathematics, the average grant amount is $24400. If we normalize by this quantity, we obtain</p>
<div><table><tr><td><pre>1
</pre></td><td><pre><span>barplot</span><span>(</span>M<span>[</span><span>2</span>,<span>]</span><span>/</span>M<span>[</span><span>2</span>,<span>8</span><span>]</span><span>)</span></pre></td></tr></table></div>
<p><img alt="" src="https://i2.wp.com/freakonometrics.hypotheses.org/files/2018/10/moy_ok.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>In other words, the average amount of a (individual) grant in chemistry (to pay for students, conferences, etc.) is twice that in mathematics, 60% higher in physics than in maths…</p>
<p>We can also look at the median values (rather than the averages)</p>
<div><table><tr><td><pre>1
</pre></td><td><pre><span>barplot</span><span>(</span>M<span>[</span><span>1</span>,<span>]</span><span>)</span></pre></td></tr></table></div>
<p><img alt="" src="https://i1.wp.com/freakonometrics.hypotheses.org/files/2018/10/med1.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>Here again, it is in mathematics that it is the weakest….</p>
<div><table><tr><td><pre>1
</pre></td><td><pre><span>barplot</span><span>(</span>M<span>[</span><span>1</span>,<span>]</span><span>/</span>M<span>[</span><span>1</span>,<span>8</span><span>]</span><span>)</span></pre></td></tr></table></div>
<p><img alt="" src="https://i0.wp.com/freakonometrics.hypotheses.org/files/2018/10/med2.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>in comparable proportions. If we think that the time spent writing should be proportional to the amount allocated, we should spend half as much time in math as in chemistry.</p>
<p>Cumulative functions can also be ploted,</p>
<div><table><tr><td><pre>1
2
3
</pre></td><td><pre><span>plot</span><span>(</span>M<span>[</span><span>3</span><span>:</span><span>101</span>,<span>8</span><span>]</span>,<span>(</span><span>1</span><span>:</span><span>99</span><span>)</span><span>/</span><span>100</span>,type<span>=</span><span>&quot;s&quot;</span>,xlim<span>=</span><span>range</span><span>(</span>M<span>)</span><span>)</span>
<span>lines</span><span>(</span>M<span>[</span><span>3</span><span>:</span><span>101</span>,<span>5</span><span>]</span>,<span>(</span><span>1</span><span>:</span><span>99</span><span>)</span><span>/</span><span>100</span>,type<span>=</span><span>&quot;s&quot;</span>,<span>col</span><span>=</span><span>&quot;red&quot;</span><span>)</span>
<span>lines</span><span>(</span>M<span>[</span><span>3</span><span>:</span><span>101</span>,<span>4</span><span>]</span>,<span>(</span><span>1</span><span>:</span><span>99</span><span>)</span><span>/</span><span>100</span>,type<span>=</span><span>&quot;s&quot;</span>,<span>col</span><span>=</span><span>&quot;blue&quot;</span><span>)</span></pre></td></tr></table></div>
<p><img alt="" src="https://i1.wp.com/freakonometrics.hypotheses.org/files/2018/10/cdf.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>with math in black, physics in red, and chemistry in blue. What is surprising is the bottom part: a “bad” researcher in chemistry or physics will earn more than the median researcher in mathematics…</p>
<p>Now that my intuition is confirmed, I have to go back, writing my proposal… and explain to my coauthors that I have to postpone some research projects because, well, you know…</p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://freakonometrics.hypotheses.org/55580"> R-english – Freakonometrics</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/AjIVoVJhJLk" height="1"></a></div>