<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="http://www.r-bloggers.com/user-2016-tutorials-part-2/"></div></div><div><a data-url="http://www.r-bloggers.com/user-2016-tutorials-part-2/" data-counturl="http://www.r-bloggers.com/user-2016-tutorials-part-2/" data-count="horizontal" data-text="useR! 2016 Tutorials: Part 2" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://blog.revolutionanalytics.com/2016/07/user-2016-tutorials-part-2-.html"> Revolutions</a></strong>, and kindly contributed to <a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers)</a> </div>
<div>
<p>by Joseph Rickert</p>
<p>Last week, <a target="_blank" href="http://blog.revolutionanalytics.com/2016/06/the-user-2016-tutorials.html">I mentioned</a> a few of the useR tutorials that I had the opportunity to attend. Here are the links to the slides and code for all but two of the tutorials:</p>
<p><a target="_blank" href="http://biostat.mc.vanderbilt.edu/tmp/course.pdf">Regression Modeling Strategies and the rms Package</a> – <a target="_blank" href="http://biostat.mc.vanderbilt.edu/tmp/course.pdf"></a>Frank Harrell<br><a target="_blank" href="http://happygitwithr.com/">Using Git and GitHub with R, RStudio, and R Markdown</a> – Jennifer Bryan<br><a target="_blank" href="https://github.com/jcheng5/user2016-tutorial-shiny">Effective Shiny Programming</a> – Joe Cheng <br><a target="_blank" href="http://juliejosse.com/?p=96">Missing Value Imputation with R</a> -Julie Josse<br><a target="_blank" href="https://github.com/ropensci/user2016-tutorial#extracting-data-from-the-web-apis-and-beyond">Extracting data from the web APIs and beyond </a>– Ram, Grolemund &amp; Chamberlain<br>Ninja Moves with data.table – Learn by Doing in a Cookbook Style Workshop – Matt Dowle<br><a target="_blank" href="https://github.com/topepo/useR2016">Never Tell Me the Odds! Machine Learning with Class Imbalances</a> – Max Kuhn<br><a target="_blank" href="https://github.com/srdas/user2016">MoRe than woRds, Text and Context: Language Analytics in Finance with R</a> – Das &amp; Mokashi<br><a target="_blank" href="https://www.dropbox.com/sh/iqq6wnp2qz7je1l/AAAzEcrcLHxizgzT0Y9DU95Za?dl=0">Time-to-Event Modeling as the Foundation of Multi-Channel Revenue Attribution </a>– Tess Calvez<br><a target="_blank" href="https://edzer.github.io/UseR2016/">Handling and Analyzing Spatial, Spatiotemporal and Movement Data</a> – Edzer Pebesma<br><a target="_blank" href="https://github.com/ledell/useR-machine-learning-tutorial">Machine Learning Algorithmic Deep Dive</a> – Erin LeDell<br>Introduction to SparkR – Venkataraman &amp; Falaki<br><a target="_blank" href="https://github.com/michhar/useR2016-tutorial-jupyter">Using R with Jupyter Notebooks for Reproducible Research</a> de Vries &amp; Harris<br>Understanding and Creating Interactive Graphics <a target="_blank" href="http://biostatistics.dk/useR/IntGraph.html#1">Part 1</a>, <a target="_blank" href="https://github.com/tdhock/interactive-tutorial">Part 2</a>– Hocking &amp; Ekstrom<br>Genome-Wide Association Analysis and Post-Analytic Interrogation <a target="_blank" href="http://nbviewer.jupyter.org/urls/www.mtholyoke.edu/courses/afoulkes/UseR2016/UseR2016-Part1.ipynb">Part 1</a>, <a target="_blank" href="http://nbviewer.jupyter.org/urls/www.mtholyoke.edu/courses/afoulkes/UseR2016/UseR2016-Part2.ipynb">Part 2</a> – Foulkes<br><a target="_blank" href="http://mc-stan.org/workshops/useR2016/">An Introduction to Bayesian Inference using R Interfaces to Stan</a> – Ben Goodrich <br><a target="_blank" href="https://github.com/becarioprecario/SAERTutorial">Small Area Estimation with R</a> – Virgilio Gómez Rubio <br><a target="_blank" href="https://dl.dropboxusercontent.com/u/15335397/slides/2016-useR-rmarkdown-Yihui-Xie.html#(1)">Dynamic Documents with R Markdown</a> – Yihui Xie</p>
<p>Granted that since the tutorials were not videotaped they mostly fall into the category of a &quot;you had to be there&quot; experience. However, many of the presenters put a significant effort into preparing their talks and collectively they comprise a rich resource that is worth a good look. Here are just of couple examples of what is to be found.</p>
<p>The first comes from Julie Josse's Missing Data tutorial where a version of the ozone data set with missing values is used to illustrate a basic principle of exploratory data analysis: visualize your data and look for missing values. If there are missing values try to determine if there are any patterns in their location.</p>
<div>
<div>
<pre>        maxO3   T9  T12  T15 Ne9 Ne12 Ne15     Vx9    Vx12    Vx15 maxO3v
<span>20010601</span>    <span>87</span> <span>15.6</span> <span>18.5</span>   <span>NA</span>   <span>4</span>    <span>4</span>    <span>8</span>  <span>0.6946</span> -<span>1.7101</span> -<span>0.6946</span>     <span>84</span>
<span>20010602</span>    <span>82</span>   <span>NA</span>   <span>NA</span>   <span>NA</span>   <span>5</span>    <span>5</span>    <span>7</span> -<span>4.3301</span> -<span>4.0000</span> -<span>3.0000</span>     <span>87</span>
<span>20010603</span>    <span>92</span> <span>15.3</span> <span>17.6</span> <span>19.5</span>   <span>2</span>   <span>NA</span>   <span>NA</span>  <span>2.9544</span>      <span>NA</span>  <span>0.5209</span>     <span>82</span>
<span>20010604</span>   <span>114</span> <span>16.2</span> <span>19.7</span>   <span>NA</span>   <span>1</span>    <span>1</span>    <span>0</span>      <span>NA</span>  <span>0.3473</span> -<span>0.1736</span>     <span>92</span>
<span>20010605</span>    <span>94</span>   <span>NA</span> <span>20.5</span> <span>20.4</span>  <span>NA</span>   <span>NA</span>   <span>NA</span> -<span>0.5000</span> -<span>2.9544</span> -<span>4.3301</span>    <span>114</span>
<span>20010606</span>    <span>80</span> <span>17.7</span> <span>19.8</span> <span>18.3</span>   <span>6</span>   <span>NA</span>    <span>7</span> -<span>5.6382</span> -<span>5.0000</span> -<span>6.0000</span>     <span>94</span></pre>
</div>
</div>
<p>These first two plot from made with the aggr() function in the <a target="_blank" href="https://mran.revolutionanalytics.com/package/VIM/">VIM package</a> shows proportion of missing values for each variable and relationship of missing values among all of the variables.</p>
<p><a target="_blank" href="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b7c8785bca970b-pi"><img title="Vim-1" alt="Vim-1" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b7c8785bca970b-800wi" border="0"></a></p>
<p>The next plot shows a scatter plot of two variables along boxplots along the margins that show the distributions of missing values for each variable. (Here blue represents data that are present and red the missing values.) The code to do this and many more advanced analyses is included on the tutorial page.</p>
<p><a target="_blank" href="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b8d20241e2970c-pi"><img title="Scatter" alt="Scatter" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b8d20241e2970c-800wi" border="0"></a></p>
<p>It looks like missing values are pretty much spread among the data.</p>
<p>Frank Harrell's tutorial provides a modern look at regression analysis from a statisticians point of view. The following plot comes from the section of his tutorial on Modeling and Testing Complex Interactions. If you haven't paid much attention to the the theory behind interpreting linear models in a while you may find this interesting.</p>
<p><a target="_blank" href="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01bb091be509970d-pi"><img title="Harrell" alt="Harrell" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01bb091be509970d-800wi" border="0"></a></p>
<p>Finally, I had one of those &quot;Aha&quot; moments right at beginning of Ben Goodrich's presentation on Bayesian modeling. MCMC methods work by simulating draws from a Markov chain whose limiting distribution converges to the distribution of interest. This technique works best when the simulated draws are able to explore the entire space of the target distribution. In the following the figure, the target is the bivariate normal distribution on the far right. Neither the Metropolis nor Gibbs Sampling algorithms come close to sampling from the entire target distribution space, but the Hamiltonian Monte Carlo &quot;NUTS&quot; algorithm in the <a target="_blank" href="https://mran.revolutionanalytics.com/package/rstan/">STAN package</a> displays very good coverage. </p>
<p><a target="_blank" href="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b7c8786437970b-pi"><img title="Comparison" alt="Comparison" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b7c8786437970b-800wi" border="0"></a></p>
<p>For reasons I described last week I believe that this year's useR tutorial speakers have raised the bar on both content and presentation. I am going to do my best to work through these before attending next year's conference in Brussels. </p>
</div>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="http://www.r-bloggers.com/user-2016-tutorials-part-2/"></div></div><div><a data-url="http://www.r-bloggers.com/user-2016-tutorials-part-2/" data-counturl="http://www.r-bloggers.com/user-2016-tutorials-part-2/" data-count="vertical" data-text="useR! 2016 Tutorials: Part 2" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://blog.revolutionanalytics.com/2016/07/user-2016-tutorials-part-2-.html"> Revolutions</a></strong>.</div>
<hr>
<a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="http://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="http://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="http://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="http://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="http://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="http://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="http://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="http://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="http://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="http://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="http://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="http://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="http://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="http://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="http://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="http://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/PG3q6FlwUKE"></a></div>