<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/jmv-one-r-package-not-just-for-the-social-sciences/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://blog.jamovi.org/2017/12/07/jmv.html"> jamovi</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<h3>tl;dr</h3>
<ul>
<li>many analyses in the social sciences require many R packages</li>
<li><code>jmv</code> makes these common analyses available from one R package</li>
<li><code>jmv</code> can be used from jamovi, a graphical statistical spreadsheet, making it super-accessible</li>
</ul>
<p><span></span></p>
<h2>introducing <code>jmv</code></h2>
<p>There are many tremendously useful R packages for the social sciences (and similar fields), such as <a rel="nofollow" href="https://cran.r-project.org/package=car" target="_blank"><code>car</code></a>, <a rel="nofollow" href="https://cran.r-project.org/package=afex" target="_blank"><code>afex</code></a> <a rel="nofollow" href="https://cran.r-project.org/package=vcd" target="_blank"><code>vcd</code></a>, etc. Although running basic analyses (such as t-tests or ANOVA) with these packages is very straight forward, it is typically necessary to perform a number of supplementary analyses to accompany them; post-hoc tests, effect-size calculations, bias-corrections, and assumption checks. These additional tests often require the use of many additional R packages, and can make reasonably standard analyses quite time-consuming to perform. For example, in the book <em>Discovering Statistics Using R</em> by Andy Field (a popular textbook in the social sciences), the chapter on ANOVA alone recommends the use of 7 packages.</p>
<p><code>jmv</code> simplifies this whole process by bringing all of these packages together and makes doing the following analyses with their most common supplementary tests, corrections and assumption checks as easy as possible:</p>
<ul>
<li>Descriptive statistics</li>
<li>T-Tests</li>
<li>ANOVA</li>
<li>ANCOVA</li>
<li>Repeated Measures ANOVA</li>
<li>Non-parametric ANOVAs</li>
<li>Correlation</li>
<li>Linear Regression</li>
<li>Contingency Tables</li>
<li>Proportion Tests</li>
<li>Factor Analysis</li>
</ul>
<p>and coming soon:</p>
<ul>
<li>Logistic Regression</li>
<li>Log-linear Regression</li>
</ul>
<p><code>jmv</code> aims to make all common statistical tests taught at an undergraduate level available from a single package.</p>
<h2>An ANOVA</h2>
<p>Let’s begin with a simple, familiar analysis – an ANOVA. In this example we use the <code>ToothGrowth</code> dataset from R, and explore whether different food supplements and their dosage affect how much a guinea pig’s teeth grow. We’ll specify <code>len</code> to be the dependent variable, and <code>supp</code> and <code>dose</code> to be the factors.</p>
<div>
<pre><code><span>library</span><span>(</span><span>'jmv'</span><span>)</span><span>
</span><span>data</span><span>(</span><span>'ToothGrowth'</span><span>)</span><span>
</span><span>jmv</span><span>::</span><span>anova</span><span>(</span><span>ToothGrowth</span><span>,</span><span>
</span><span>dep</span><span> </span><span>=</span><span> </span><span>'len'</span><span>,</span><span>
</span><span>factors</span><span> </span><span>=</span><span> </span><span>c</span><span>(</span><span>'supp'</span><span>,</span><span> </span><span>'dose'</span><span>))</span><span>
</span></code></pre>
</div>
<div>
<pre><code>##
##  ANOVA
##
##  ANOVA                                                                   
##  ───────────────────────────────────────────────────────────────────────
##                 Sum of Squares    df    Mean Square    F        p        
##  ───────────────────────────────────────────────────────────────────────
##    supp                    205     1          205.4    15.57    &lt; .001   
##    dose                   2426     2         1213.2    92.00    &lt; .001   
##    supp:dose               108     2           54.2     4.11     0.022   
##    Residuals               712    54           13.2                      
##  ───────────────────────────────────────────────────────────────────────
</code></pre>
</div>
<p>This produces what should be a familiar ANOVA table. You have likely seen something like this in R before, though perhaps not as nicely formatted.</p>
<p>Where <code>jmv</code> really comes into its own, is with additional options. In the following example we will perform the same analysis, but additionally requesting effect-size, post-hoc tests, homogeneity of variances tests, descriptive statistics, and a descriptives plot:</p>
<div>
<pre><code><span>library</span><span>(</span><span>'jmv'</span><span>)</span><span>
</span><span>data</span><span>(</span><span>'ToothGrowth'</span><span>)</span><span>
</span><span>jmv</span><span>::</span><span>anova</span><span>(</span><span>ToothGrowth</span><span>,</span><span>
</span><span>dep</span><span> </span><span>=</span><span> </span><span>'len'</span><span>,</span><span>
</span><span>factors</span><span> </span><span>=</span><span> </span><span>c</span><span>(</span><span>'supp'</span><span>,</span><span> </span><span>'dose'</span><span>),</span><span>
</span><span>effectSize</span><span> </span><span>=</span><span> </span><span>'eta'</span><span>,</span><span>
</span><span>postHoc</span><span> </span><span>=</span><span> </span><span>c</span><span>(</span><span>'supp'</span><span>,</span><span> </span><span>'dose'</span><span>),</span><span>
</span><span>plotHAxis</span><span> </span><span>=</span><span> </span><span>'dose'</span><span>,</span><span>
</span><span>plotSepLines</span><span> </span><span>=</span><span> </span><span>'supp'</span><span>,</span><span>
</span><span>descStats</span><span> </span><span>=</span><span> </span><span>TRUE</span><span>,</span><span>
</span><span>homo</span><span> </span><span>=</span><span> </span><span>TRUE</span><span>)</span><span>
</span></code></pre>
</div>
<div>
<pre><code>##
##  ANOVA
##
##  ANOVA                                                                            
##  ────────────────────────────────────────────────────────────────────────────────
##                 Sum of Squares    df    Mean Square    F        p         η²      
##  ────────────────────────────────────────────────────────────────────────────────
##    supp                    205     1          205.4    15.57    &lt; .001    0.059   
##    dose                   2426     2         1213.2    92.00    &lt; .001    0.703   
##    supp:dose               108     2           54.2     4.11     0.022    0.031   
##    Residuals               712    54           13.2                               
##  ────────────────────────────────────────────────────────────────────────────────
##
##
##  ASSUMPTION CHECKS
##
##  Test for Homogeneity of Variances (Levene's)
##  ────────────────────────────────────────────
##    F       df1    df2    p       
##  ────────────────────────────────────────────
##    1.94      5     54    0.103   
##  ────────────────────────────────────────────
##
##
##  POST HOC TESTS
##
##  Post Hoc Comparisons - supp                                                  
##  ────────────────────────────────────────────────────────────────────────────
##    supp         supp    Mean Difference    SE       df      t       p-tukey   
##  ────────────────────────────────────────────────────────────────────────────
##    OJ      -    VC                 3.70    0.938    54.0    3.95    &lt; .001   
##  ────────────────────────────────────────────────────────────────────────────
##
##
##  Post Hoc Comparisons - dose                                                   
##  ─────────────────────────────────────────────────────────────────────────────
##    dose         dose    Mean Difference    SE      df      t         p-tukey   
##  ─────────────────────────────────────────────────────────────────────────────
##    0.5     -    1                 -9.13    1.15    54.0     -7.95    &lt; .001   
##            -    2                -15.50    1.15    54.0    -13.49    &lt; .001   
##    1       -    2                 -6.37    1.15    54.0     -5.54    &lt; .001   
##  ─────────────────────────────────────────────────────────────────────────────
##
##
##  Descriptives                            
##  ───────────────────────────────────────
##    supp    dose    N     Mean     SD     
##  ───────────────────────────────────────
##      OJ     0.5    10    13.23    4.46   
##      OJ       1    10    22.70    3.91   
##      OJ       2    10    26.06    2.66   
##      VC     0.5    10     7.98    2.75   
##      VC       1    10    16.77    2.52   
##      VC       2    10    26.14    4.80   
##  ───────────────────────────────────────
</code></pre>
</div>
<p><img alt="ToothGrowth" src="https://i1.wp.com/blog.jamovi.org/assets/images/jmv-toothgrowth.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>As can be seen, <code>jmv</code> can provide many additional tests and statistics relevant to the main tests, but with far less effort.</p>
<p>You can explore additional options for the <code>jmv</code> ANOVA <a rel="nofollow" href="https://www.jamovi.org/jmv/anova.html" target="_blank">here</a>, and the other tests and their available options <a rel="nofollow" href="https://www.jamovi.org/jmv" target="_blank">here</a>.</p>
<h2>jamovi integration</h2>
<p><code>jmv</code> is also useable from the <a rel="nofollow" href="https://www.jamovi.org/" target="_blank">jamovi</a> statistical spreadsheet. jamovi makes a range of analyses accessible to a broader audience by making them available from a familiar, spreadsheet user-interface. jamovi can also make the underlying R code for each analysis available, making it easy for people to learn R, and transition to R scripting if they like.</p>
<p>Here is exactly the same analysis as above, having been performed in jamovi.</p>
<p><img alt="jamovi" src="https://i2.wp.com/blog.jamovi.org/assets/images/jmv.png?w=456&ssl=1" data-recalc-dims="1"></p>
<h2>summing up</h2>
<ul>
<li><code>jmv</code> makes a whole suite of common analyses from the social sciences very easy to perform</li>
<li><code>jamovi</code> makes these <em>even</em> easier to perform</li>
</ul>
<p>jmv is available from <a rel="nofollow" href="https://cran.r-project.org/package=jmv" target="_blank">CRAN</a></p>
<p>jamovi is available from <a rel="nofollow" href="https://www.jamovi.org/" target="_blank">www.jamovi.org</a></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://blog.jamovi.org/2017/12/07/jmv.html"> jamovi</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/QA0HBwmoolo" height="1"></a></div>