<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/one-way-manova-exercises/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://r-exercises.com/2017/03/17/one-way-manova-exercises/?utm_source=rss&utm_medium=rss&utm_campaign=one-way-manova-exercises"> R-exercises</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><a target="_blank" rel="nofollow" href="http://r-exercises.com/wp-content/uploads/2017/04/manova-1.png?x61433"><img sizes="(max-width: 150px) 100vw, 150px" alt="" class="wp-image-4731" src="https://i2.wp.com/r-exercises.com/wp-content/uploads/2017/04/manova-1-150x150.png?resize=150%2C150" data-recalc-dims="1"></a></p>
<p>In ANOVA our interest lies in knowing if one continuous dependent variable is affected by one or more categorical independent variables. MANOVA is an extension of ANOVA where we are now able to understand how several dependent variables are affected by independent variables. For example consider an investigation where a medical investigator has developed 3 back pain therapies. Patients are enrolled for a 10 week trial and at the end the investigator interviews them on reduction of physiological, emotional and cognitive pain. Interest is in knowing which therapy is best at reducing pain.</p>
<p>Just like in ANOVA we can have one way or two way MANOVA depending on number of independent variables.</p>
<p>When conducting MANOVA it is important to understand the assumptions that need to be satisfied so that the results are valid. The assumptions are explained below.</p>
<ul>
<li>The observations are independent. Observations that are collected over time, over space and in any groupings violate the assumption of independence.</li>
<li>The data follows a multivariate normal distribution. When observations are many we can rely on the central limit theorem (CLT) to achieve normality. It has been generally accepted any distribution with more than that observations will follow a normal distribution. MANOVA is robust to any non-normality that arises from skewness but it is not robust to non-normality resulting from outliers. Outliers should be checked and appropriate action taken. Analysis can be done with and without the outliers to check sensitivity.</li>
<li>The variance in all the groups is homogeneous. A Bartlett test is useful for assessing the homogeneity of variance. MANOVA is not robust to deviations from the assumption of normality therefore a transformation is required to stabilize variance.</li>
</ul>
<p>MANOVA can be used to understand the interactions and main effects of independent variables. The four test statistics that can be used are Wilk’s lambda, Pillai trace, Hotelling-Lawley trace and Roy’s maximum root. Among the four test statistics Pillai is least affected by any violations in assumptions but Wilk’s is the most commonly used.</p>
<p>In this first part of MANOVA exercises we will use data from a study investigating a control and three therapies aimed at reducing symptoms of koro. Forty patients were selected for inclusion in the study and 10 patients were assigned to each of the four groups. Interest is in understanding which therapy is best in reducing symptoms. We will create three variables that hold change in indices before and after treatment. Here we have one independent variable and three dependent variables resulting in a one way MANOVA.</p>
<p>Solutions to these exercises can be found <a target="_blank" rel="nofollow" href="http://r-exercises.com/2017/03/17/one-way-manova-in-r-solutions/">here</a></p>
<p><strong>Exercise 1</strong></p>
<p>Import data into R</p>
<p><strong>Exercise 2</strong></p>
<p>Check the number of observations in each group</p>
<p><strong>Exercise 3</strong></p>
<p>Create the variables that hold the change in indices</p>
<p><strong>Exercise 4</strong></p>
<p>Summarize the change variables</p>
<p><strong>Exercise 5</strong></p>
<p>Get descriptive statistics for each therapy</p>
<p><strong>Exercise 6</strong></p>
<p>Obtain the correlation matrix</p>
<p><strong>Exercise 7</strong></p>
<p>Check for outliers</p>
<p><strong>Exercise 8</strong></p>
<p>Check for homogeneity of variance</p>
<p><strong>Exercise 9</strong></p>
<p>Run MANOVA test with outliers</p>
<p><strong>Exercise 10</strong></p>
<p>Interpret results</p>
<div>
<h3>Related exercise sets:</h3>
<ol>
<li><a title="One Way Analysis of Variance Exercises" target="_blank" rel="nofollow" href="http://r-exercises.com/2016/09/30/one-way-analysis-of-variance-exercises/">One Way Analysis of Variance Exercises </a></li>
<li><a title="Two Way ANOVA in R Exercises" target="_blank" rel="nofollow" href="http://r-exercises.com/2016/10/17/two-way-anova-in-r-exercises/">Two Way ANOVA in R Exercises </a></li>
<li><a title="Paired t-test in R Exercises" target="_blank" rel="nofollow" href="http://r-exercises.com/2016/09/21/paired-t-test-in-r/">Paired t-test in R Exercises </a></li>
<li><a target="_blank" rel="nofollow" href="http://r-exercises.com/start-here-to-learn-r/">Explore all our (>1000) R exercises</a></li>
<li><a target="_blank" rel="nofollow" href="http://r-exercises.com/r-courses/">Find an R course using our R Course Finder</a> directory</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="http://r-exercises.com/2017/03/17/one-way-manova-exercises/?utm_source=rss&utm_medium=rss&utm_campaign=one-way-manova-exercises"> R-exercises</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 title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/jo2SIKzH0lo"></a></div>