Hi everyone, I am new to MANOVA, I have a set of 3 different type of data which was measured from 7 days and 16 subjects as the attached file shows. It was supposed to use ranova(), but it did not pass the mauchly test and have low sphericity. So, I used manova() to perform statistical analysis, but I don't know how manova() function calculate the df2 (in my case the result of df2 is 12)? In internet, it said use sample size minus the number of repeated-measures variables, but the result is different from what the manova() funtion got.

8 Comments

Scott MacKenzie
Scott MacKenzie on 4 May 2021
Edited: Scott MacKenzie on 4 May 2021
I just looked at your data. It seems you have a 3 x 7 mixed design with 16 participants. There is one between-subjects factor (motion with 3 levels) and one within-subjects factor (day with 7 levels). This is a straight-forward analysis. There are a few issues to clarify, first.
(1) What is "motion"? What are the three levels? Please clarify.
(2) I assume "day" is day of the week, or something like that. Is that correct? Please clarify.
(3) What is the dependent variable (i.e., what do the data represent)?
Adam Danz
Adam Danz on 4 May 2021
In additon to Scott's excelent advice, be sure to test all of the assumptions that MANOVA must adhere by in order to use that test.
Otherwise you'll need to transform your data so that the transformed data adhere to the assumption or use a non-parametric test.
bingbin wang
bingbin wang on 4 May 2021
Hi Scott, let me answer the third question first, this is basically a sEMG signal measurment from each day of week(7 Days), and different motions have different amplitude of sEMG signal.
OK, thanks. Just another clarification or two, if I may.
I'm assuming then, that the subjects were required to do one of 3 different motions while the measurement was taken. Is that correct? What kind of motion?
Does the signal measurement have units (e.g., volts)?
Some of the data values are negative. Is that correct?
bingbin wang
bingbin wang on 4 May 2021
Yes, they were asking to do one of these three motions —— 'open hand','close hand' and 'rest'. The signal have unit 'volts' and the negative values are correct.
OK, thanks for the clarification. Sounds like interesting research.
I'm just looking at the data and am a bit puzzled. Here's a screen snip from your spreadsheet. It shows the data for subjects 1-3, motions 1-3, days 1-4:
The data don't look like measurements. They look like increments of a count, or something like that. Is this perhaps the wrong data?
bingbin wang
bingbin wang on 4 May 2021
Sorry about that. Because I am not allowed to post the real data, so I modify them a bit.
Well that takes a lot of the fun out of it, from my perspecitve, anyway I was looking forward to also providing an interpretation of the results, but that won't be possible, obviously. I just posted a solution script and some comments.

Sign in to comment.

 Accepted Answer

Scott MacKenzie
Scott MacKenzie on 4 May 2021
Edited: Scott MacKenzie on 5 May 2021
You can't use a manova tool, because you only have one dependent variable. For your data, the parametric Anova is probably the best option, even if the underlying assumptions are not met. Your data are ratio scale (as opposed to inteval or ordinal) so using a parametric Anova avoids the inevitable "loss of information" if a non-parametric test is used.
You can use MATLAB's ranova or anovan function. Below, I show a script to analyse your data using anovan. I modified the spreadsheet to change all the response data (cells C2:P49) to random numbers, since the data in the spreadsheet were not the actual data from the experiment.
T = readtable('example.xlsx');
n = 16; % number of participants
nw1 = 3; % number of levels of 1st within-subjects factor
nw2 = 7; % number of levels of 2nd within-subjects factor
varNames = {'Motion', 'Day', 'Participant'};
y1 = table2array(T(:,3:end)); % raw data: 48 x 7
y2 = y1(:); % convert to vector: 336 x 1
w1 = repmat((1:3)', 16, 7); w1 = w1(:); % w1 vector
w2 = repmat(1:7, 48, 1); w2 = w2(:); % w2 vector
s = repmat(round((2:49)/3), 1, 7); s = s(:); % subjects/participants vector
[~, table, ~] = anovan(y2,{w1, w2, s}, ...
'model', 3, ...
'random', 3, ... % because 'subject' is the third variable
'varnames', varNames);
Here's the anova table:
As expected, all effects are non-significant. I hope you have more interesting results in the real data. Good luck.

8 Comments

bingbin wang
bingbin wang on 4 May 2021
Actually, I was using RANOVA, but the sphericity is too low(less than 0.70), when sphericity is larger than 0.70 I can use Greenhouse-Geisser and Huynh-Feldt adjustment, and some literature said MANOVA is better than RANOVA when sphericity is too low(less than 0.70). Could you give me some suggestion when the sphericity is less than 0.7 in RANOVA?
This is venturing into an area I don't inhabit. I'm against adjusting or transforming the data to bring them in line with assumptions. I would not be the first person to observe that such transformations amount to little more than "cooking the data" to achieve a desired outcome. I'll hold to my suggestion above to proceed with the parametric anova on the data you have. Again, good luck.
bingbin wang
bingbin wang on 5 May 2021
Thank you so much Scott! I will try it at my data.
You're welcome. BTW, if there is any possibility you can share the experiment data, I'd be happy to provide a more detailed analysis. I'm easy to reach, as there is an email icon in the popup for my name. There's also a link to my homepage. Cheers.
Adam Danz
Adam Danz on 5 May 2021
+1 nice demo & answer.
> I'm against adjusting or transforming the data to bring them in line with assumptions
Me too, although some transformations such as log-transform are extremely common in science and perfectly OK if it results in satisfying assumptions such as normality. But I'd go a step further and suggest not using parametric tests at all whenever possible.
bingbin wang
bingbin wang on 5 May 2021
Thank you Adam,I will considering your suggestion. BTW, Could I have any paper that support your opinion?
Adam Danz
Adam Danz on 5 May 2021
Log transforms in regression is covered in nearly every stats text book and you'll find log transforms in hundreds and hundreds of academic journal articles. Google "log transformations in regression" and every hit on the first few pages are relevant.
For example, the first paper listed in the search results contains this useful figure showing the results of a log transform making the distribution approximately normal.
If you were referring to my opinion on avoiding parametric tests altogether, it's not only my opinion. Hundreds of scientists and statisticians around the world support the movement to replace statisticial significance tests (p-values) with alternatives including non-parametric tests, bootstrapping, visualizing error, etc. Several high impact journals have even banned the use of p-values completely or have banned rounding p-values to arbitrary significance levels.
bingbin wang
bingbin wang on 5 May 2021
Thank you again for answering Adam.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!