<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/using-r-exams-for-short-exams-during-a-statistics-course/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.r-exams.org/general/uni_koblenz_landau/"> R/exams</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>Experiences with using R/exams for multiple automated and randomized exams in an applied statistics course for environmental scientists at Universität Koblenz-Landau.</p>
<p><img alt="Using R/exams for Short Exams during a Statistics Course" src="https://i2.wp.com/www.r-exams.org/images/unikoblenzlandau.title.png?w=456" data-recalc-dims="1"></p>
<p>Guest post by <a rel="nofollow" href="https://www.uni-koblenz-landau.de/en/campus-landau/faculty7/environmental-sciences/landscape-ecology/staff/ralf-schaefer/ralf-schaefer" target="_blank">Ralf B. Schäfer</a> (Universität Koblenz-Landau, Institute for Environmental Sciences).</p>
<h3>Background</h3>
<p>In many study courses in Germany, exams are written directly after the course period, resulting in a high workload for students within a short period. While we have recommended to students to continuously learn and practice for the exams during the course period, such recommendations were not widely taken up. Therefore, we decided, after discussion with the student representatives, to replace the exam at the end of our course in <a rel="nofollow" href="https://www.uni-koblenz-landau.de/en/campus-landau/faculty7/environmental-sciences/landscape-ecology/teaching/r-statistics" target="_blank">Applied Statistics for Environmental Scientists</a> by six short exams. The exams were held approximately every third week and were designed to be completed within 15 minutes. Given the resulting increase in exam numbers and workload in a course with almost 100 students, we decided to transition to automated exams.</p>
<h3>Exam implementation</h3>
<p>After a brief review of available tools, we identified <a rel="nofollow" href="http://www.r-exams.org/" target="_blank">R/exams</a> as matching our requirements for automation, which were the following:</p>
<ul>
<li>easy to set up,</li>
<li>availability of supporting resources such as tutorials and examples,</li>
<li>usable for paper exams,</li>
<li>mixed exercises possible (e.g., free text, multiple choice),</li>
<li>automated creation of randomized exams and exercises,</li>
<li>automated evaluation of filled exams.</li>
</ul>
<p>Our implementation was guided by the available supporting resources at <a rel="nofollow" href="http://www.r-exams.org/tutorials/" target="_blank">http://www.R-exams.org/tutorials/</a> and <a rel="nofollow" href="https://cran.r-project.org/package=exams" target="_blank">https://CRAN.R-project.org/package=exams</a> (vignettes). Indeed, the resources made the transition to automated exams very smooth and we strongly recommend to dig into the resources if you plan to use the package. Noteworthy, the help by the package developer Achim Zeileis on a few minor glitches was incredibly fast and supportive. The main transition work was to recast our questions and exercises into the <a rel="nofollow" href="http://www.r-exams.org/tutorials/first_steps/" target="_blank">R/Markdown format</a> employed by R/exams (alternatively you could use R/LaTeX).</p>
<p>The short <a rel="nofollow" href="http://www.r-exams.org/intro/written/" target="_blank">written exams</a> were generated by <a rel="nofollow" href="http://www.r-exams.org/tutorials/exams2nops/" target="_blank"><code>exams2nops</code></a> using a mix of multiple-choice and numeric exercises (treated as open-ended questions by <code>exams2nops</code>). As an example, the code below creates a PDF (<a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-02-28-uni_koblenz_landau/nops1.pdf" target="_blank">nops1.pdf</a>) from three such exercise templates (<a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-02-28-uni_koblenz_landau/1_mch_GLM_LM.Rmd" target="_blank">1_mch_GLM_LM.Rmd</a>, <a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-02-28-uni_koblenz_landau/1_num_multi.Rmd" target="_blank">1_num_multi.Rmd</a>, <a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-02-28-uni_koblenz_landau/2_mch_PCA.Rmd" target="_blank">2_mch_PCA.Rmd</a>) along with the institute logo (<a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-02-28-uni_koblenz_landau/logo.png" target="_blank">logo.png</a>). The multiple-choice exercises can be scanned fully automatically while the open-ended question has to be marked manually before being scanned as well.</p>
<pre><code>## load package
library(&quot;exams&quot;)

## exams2nops
## PDF output in NOPS format (1 file per exam)
## -> for exams that can be printed, scanned, and automatically evaluated in R

## define an exam (= list of exercises)
myexam &lt;- list(&quot;1_mch_GLM_LM.Rmd&quot;, &quot;1_num_multi.Rmd&quot;, &quot;2_mch_PCA.Rmd&quot;)

## create PDFs in working directory
set.seed(2018-02-05)
ex1 &lt;- exams2nops(myexam, n = 1, dir = &quot;.&quot;, title = &quot;Exam 3 by RBS&quot;,
  institution = &quot;Applied Multivariate Statistics&quot;, date = &quot;2018-02-05&quot;,
  course = &quot;Statistics&quot;, reglength = 9, points = c(4, 2, 2),
  showpoints = TRUE, duplex = FALSE, blank = 0,
  logo = file.path(getwd(), &quot;logo.png&quot;))
</code></pre>
<p><a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-02-28-uni_koblenz_landau/nops1.pdf" target="_blank"><img alt="nops1.pdf" src="https://i2.wp.com/www.r-exams.org/assets/posts/2018-02-28-uni_koblenz_landau/nops1a.png?w=456" data-recalc-dims="1"></a><br>
<a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-02-28-uni_koblenz_landau/nops1.pdf" target="_blank"><img alt="nops1.pdf" src="https://i0.wp.com/www.r-exams.org/assets/posts/2018-02-28-uni_koblenz_landau/nops1b.png?w=456" data-recalc-dims="1"></a><br>
<a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-02-28-uni_koblenz_landau/nops1.pdf" target="_blank"><img alt="nops1.pdf" src="https://i2.wp.com/www.r-exams.org/assets/posts/2018-02-28-uni_koblenz_landau/nops1c.png?w=456" data-recalc-dims="1"></a></p>
<p>The transition came with several advantages, particularly to have completely randomized exams:</p>
<ol>
<li>The answers to multiple choice questions can be shuffled (by setting <code>exshuffle: TRUE</code> in the metadata of the R/Markdown files, see <a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-02-28-uni_koblenz_landau/1_mch_GLM_LM.Rmd" target="_blank">1_mch_GLM_LM.Rmd</a>, <a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-02-28-uni_koblenz_landau/2_mch_PCA.Rmd" target="_blank">2_mch_PCA.Rmd</a>).</li>
<li>The questions included in a single exam can be randomly sampled from a pool of questions by using vectors as list elements when defining the list of exercises/questions.</li>
<li>Questions relying on data sets can be randomized through resampling (see <a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-02-28-uni_koblenz_landau/1_num_multi.Rmd" target="_blank">1_num_multi.Rmd</a> for an example). The following lines represent the crucial part of the code to generate a random data set:</li>
</ol>
<pre><code>data(&quot;USairpollution&quot;, package = &quot;HSAUR2&quot;)  
nsize &lt;- sample(50:150, 1)  
sampled_dat &lt;- sample(1:nrow(USairpollution), nsize, replace = TRUE)  
final_data &lt;- USairpollution[sampled_dat, ]
</code></pre>
<h3>Challenges and outlook</h3>
<p>Randomization is particularly interesting because the exams can be re-used and students cannot copy from other exams (at least not as easily). The main challenges in using R/exams were actually due to human fallibility. Despite stated on the exam and explained before the exam, several students completed their exam incorrectly, requiring manual revisiting and correction, e.g., not marking the boxes on the exam sheet correctly:</p>
<p><img alt="One of the challenges with automated exams is incorrect marking." src="https://i2.wp.com/www.r-exams.org/assets/posts/2018-02-28-uni_koblenz_landau/nops-registration-error.png?w=456" data-recalc-dims="1"></p>
<p>These were about 5-10% in the first round and less than 5% of exams in subsequent exams. Overall, R/exams saved us many hours of time for correcting exams and we will certainly continue using it and it has attracted attention by other faculty members. In the future, we plan to complement our course by practical exercises in R using the learning management platform <a rel="nofollow" href="https://www.openolat.com/" target="_blank">OpenOLAT</a>. For this, we will benefit from the exams package options to <a rel="nofollow" href="http://www.r-exams.org/intro/elearning/" target="_blank">create and export exercises to learning management platforms</a> such as OLAT or Moodle.</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="http://www.r-exams.org/general/uni_koblenz_landau/"> R/exams</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/DWW8eLglPrw" height="1"></a></div>