<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/outcomerate-transparent-communication-of-quality-in-social-surveys/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://ropensci.org/blog/2018/10/02/outcomerate/"> rOpenSci - open tools for open science</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<h4>Background</h4>
<p>Surveys are ubiquitous in the social sciences, and the best of them are meticulously planned out. Statisticians often decide on a sample size based on a theoretical design, and then proceed to inflate this number to account for “sample losses”. This ensures that the desired sample size is achieved, even in the presence of non-response. Factors that reduce the pool of interviews include participant refusals, inability to contact respondents, deaths, and frame inaccuracies.<sup><a rel="nofollow" href="https://ropensci.org/blog/2018/10/02/outcomerate/#fn:frame" target="_blank">1</a></sup> The more non-response, the more a study becomes open to criticism about its veracity.</p>
<p><img alt="" src="https://i1.wp.com/ropensci.org/img/blog-images/2018-10-02-outcomerate/samples.jpg?w=456&ssl=1" data-recalc-dims="1"></p>
<p>To simplify communication about non-response, a set of “outcome rates” have emerged over time. These rates are essentially quality declarations about the operational elements in a survey. Broadly speaking, they relate how well an actual respondent set <em>r</em> matches its intended sample <em>s</em>.</p>
<p>Some of popular outcome rates include:</p>
<ul>
<li><strong>Response Rate:</strong> The proportion of your sample that results in an interview.</li>
<li><strong>Cooperation Rate:</strong> The proportion of people contacted who participate in your survey.</li>
<li><strong>Refusal Rate:</strong> The proportion of your sample that refused to participate.</li>
<li><strong>Contact Rate:</strong> The proportion of sampled cases where you manage to reach the respondent.</li>
<li><strong>Location Rate:</strong> The proportion of cases (say, in an establishment survey) that you manage to locate.</li>
</ul>
<p>Sounds straightforward. But for a long time, it was <a rel="nofollow" href="http://www.srl.uic.edu/publist/Conference/rr_reporting.pdf" target="_blank">common to find disparate definitions of these rates</a>. This made it hard to judge the quality of one survey against another.</p>
<h4>What Problem Does the Package Solve?</h4>
<p>The package calculates standard outcome rates in R in order to encourage transparent research, open methods, and scientific comparability. It does so using the <a rel="nofollow" href="https://www.aapor.org/" target="_blank"><em>American Association of Public Opinion Research</em></a>’s (AAPOR) <a rel="nofollow" href="https://www.aapor.org/Standards-Ethics/Standard-Definitions-(1).aspx" target="_blank">definitions</a> of the rates, which are the industry standard. By collecting them in one package, it saves you the time of repetitively looking up each rate and calculating them separately.</p>
<p>As a contrived example, let’s assume we draw a sample of 10 people. Five individuals provide a complete interview (<code>I</code>), one provides a partial interview (<code>P</code>), one refuses to participate (<code>R</code>), and two are unreachable but known to be eligible (<code>NC</code>). Our 10th case is also unreachable but we don’t know if they are illegible to begin with (<code>UH</code>).</p>
<pre><code>library(outcomerate)
x &lt;- c(I = 5, P = 1, R = 1, NC = 2, UH = 1)

outcomerate(x)
#>   RR1   RR2   RR5   RR6 COOP1 COOP2 COOP3 COOP4  REF1  REF3  CON1  CON3  LOC1
#>  0.50  0.60  0.56  0.67  0.71  0.86  0.71  0.86  0.10  0.11  0.70  0.78  0.90
</code></pre>
<p>By default, the function returns only the rates that are defined based on the input. Here, we see that the example case achieved a <strong>Response Rate 2 (RR2)</strong> of 60%, and a <strong>Cooperation Rate 1 (COOP1)</strong> of 71%. Other rates, such as <strong>Response Rate 3 (RR3)</strong>, are not returned as they only become available if you specify additional parameters (see <a rel="nofollow" href="https://ropensci.github.io/outcomerate/reference/outcomerate.html" target="_blank"><code>?outcomerate</code></a> for details).</p>
<p>The same output can be obtained by specifying the input as a vector of cases. This format may be more natural if you have a dataframe of interviews, or a stream of daily data coming from a server:</p>
<pre><code>y &lt;- c(&quot;I&quot;, &quot;I&quot;, &quot;I&quot;, &quot;I&quot;, &quot;I&quot;, &quot;P&quot;, &quot;R&quot;, &quot;NC&quot;, &quot;NC&quot;, &quot;UH&quot;)

outcomerate(y)
#>   RR1   RR2   RR5   RR6 COOP1 COOP2 COOP3 COOP4  REF1  REF3  CON1  CON3  LOC1
#>  0.50  0.60  0.56  0.67  0.71  0.86  0.71  0.86  0.10  0.11  0.70  0.78  0.90
</code></pre>
<p><a rel="nofollow" href="https://ropensci.github.io/outcomerate/reference/outcomerate.html" target="_blank"><code>outcomerate()</code></a> replicates some of the functionality that AAPOR already makes available in their <a rel="nofollow" href="https://www.aapor.org/Education-Resources/For-Researchers/Poll-Survey-FAQ/Response-Rates-An-Overview.aspx" target="_blank">Excel-based calculator</a>. Theirs is a wonderful free tool, but has some limitations. For one, the Excel calculator is not designed to compute many rates by sub-domain. In my own work, I often need rates in real time by day, by researcher/enumerator, and by geography. Doing each analysis in a separate Excel workbook is impractical. Instead, <a rel="nofollow" href="https://ropensci.github.io/outcomerate/reference/outcomerate.html" target="_blank"><code>outcomerate()</code></a> makes it <a rel="nofollow" href="https://ropensci.github.io/outcomerate/articles/intro-to-outcomerate.html#more-advanced-uses" target="_blank">easy to achieve this</a> with <code>dplyr</code>, <code>aggregate()</code>, or <code>data.table</code>.</p>
<p>Another problem is that Excel is notorious for failing silently. It will give you a result even if the input contains errors or inconsistencies. Especially when I am updating this information daily, those mistakes are quick to slip in. <a rel="nofollow" href="https://github.com/ropensci/outcomerate" target="_blank"><code>outcomerate</code></a> helps overcome this by failing fast and failing helpfully:</p>
<pre><code>outcomerate(c(&quot;I&quot;, &quot;I&quot;, &quot;P&quot;, NA))
#> Error in assert_disposition(x): The input 'x' contains NA values. Consider converting them to 
#> NE (known inelligibles) or UO / UH (unknown elligibility)
</code></pre>
<p>The package also implements weighted calculations of rates. Weighted figures further advance reproducible research because they typically estimate the outcome rate at the population level rather than for the sample. This is useful information to share with the world, as it helps others plan for sample losses in future studies. Unless you plan to replicate the sampling design exactly, it is often more useful to know the (weighted) population rate and/or rates by sub-domain.</p>
<pre><code>outcomerate(y, weight = 10:1) # fake weights
#>   RR1w   RR2w   RR5w   RR6w COOP1w COOP2w COOP3w COOP4w  REF1w  REF3w 
#>   0.73   0.82   0.74   0.83   0.82   0.92   0.82   0.92   0.07   0.07 
#>  CON1w  CON3w  LOC1w 
#>   0.89   0.91   0.98
</code></pre>
<h4>Future Development</h4>
<p>I welcome contributions to <a rel="nofollow" href="https://github.com/ropensci/outcomerate" target="_blank"><code>outcomerate</code></a> (<a rel="nofollow" href="https://twitter.com/hacktoberfest" target="_blank">#hacktoberfest</a>). Some ideas for enhancements include:</p>
<ul>
<li><strong>Implementing other sections from the AAPOR manual</strong> (<a rel="nofollow" href="https://github.com/ropensci/outcomerate/issues/2" target="_blank">#2</a>): Though arguably less popular than the “main” outcome rates, AAPOR has separate chapters for telephone surveys, online panels, and mixed-mode survey work. I chose not implement these initially, because some of the definitions differ despite using similar codes.</li>
<li><strong>Publication-ready tables</strong> (<a rel="nofollow" href="https://github.com/ropensci/outcomerate/issues/3" target="_blank">#3</a>): I imagine that many users will want to make publication-ready tables of the outcome rates. It would be nice to have a function that returns professional tables in LaTex and HTML.</li>
<li><strong>Adding methods to calculate standard error</strong> (<a rel="nofollow" href="https://github.com/ropensci/outcomerate/issues/4" target="_blank">#4</a>): I am also considering functions that provide the standard error of the rates.</li>
<li><strong>Writing new vignettes:</strong> Some topics I wish to write more about include real-time monitoring of survey quality (<a rel="nofollow" href="https://github.com/ropensci/outcomerate/issues/5" target="_blank">#5</a>), and variance calculations of outcome rates in complex designs (<a rel="nofollow" href="https://github.com/ropensci/outcomerate/issues/6" target="_blank">#6</a>).</li>
</ul>
<h4>Acknowledgements</h4>
<p>My thanks goes to <a rel="nofollow" href="https://github.com/nealrichardson" target="_blank">Neil Richardson</a>, <a rel="nofollow" href="https://github.com/carlganz" target="_blank">Carl Ganz</a>, and <a rel="nofollow" href="https://github.com/karthik" target="_blank">Karthik Ram</a> for their peer review and editorial support at <a rel="nofollow" href="https://ropensci.org/" target="_blank">rOpenSci</a>. <a rel="nofollow" href="https://github.com/ropensci/outcomerate" target="_blank"><code>outcomerate</code></a> is better for it, and my programming style and knowledge has improved. Naturally, I also wish to acknowledge AAPOR for advancing the practice of survey research— this package is built on the definitions they helped standardize.</p>
<div>
<hr>
<ol>
<li>Frame inaccuracies are mistakes in the list of population elements from which the sample is drawn. Their <em>post-facto</em> discovery has implications for design-based inference, because the original sample then no longer relates cleanly to the target population. Such inaccuracies impact outcome rate calculation, depending on whether or not you use your initial mistaken frame or make an adjustment to correct for ineligible cases.<br>
<a rel="nofollow" href="https://ropensci.org/blog/2018/10/02/outcomerate/#fnref:frame" target="_blank"><img alt="↩" src="https://s.w.org/images/core/emoji/2.4/72x72/21a9.png" class="wp-smiley"></a></li>
</ol>
</div>
	<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://ropensci.org/blog/2018/10/02/outcomerate/"> rOpenSci - open tools for open science</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/HxBdP91ai9E" height="1"></a></div>