How to setup a Repeated Measurements. model and then perform a Manova

15 views (last 30 days)
Hi there,
I'm trying to perform a Manova analysis using the corresponding Repeated Measurements model, or at least that is what I think is the right aproach.
My data comes from a Full-Factorial DOE with 3 factors, 2 levels each plus a control group (no-treatment whatsoever). I also have multiple replicates in each experimental group so each group has different sample-size since subjects were asigned randomly to any of the experimental groups, 9 in total (2^3 + 1), and four different measurements were recorded for each subject. These measurements are highly correlated.
Attached is a sample of the data containing:
  • Subject's ID
  • Subject's Experimental Group
  • Factor 1 to 3 (coded "1" or "-1")
  • Factor 1 to 3 real level's values
  • P 1 to 4 --> Measurements
Hope anyone could point me in the right direction to setup the model parameters and the manova. Thanks!!
Regards,
Juan
  2 Comments
Jeff Miller
Jeff Miller on 25 Sep 2020
2^3+1 is not a factorial design. Do you just want to consider the 9 groups as a single factor with 9 levels? Or maybe leave out the control group and consider the 2^3 groups?
Juan Renteria
Juan Renteria on 25 Sep 2020
Hello Jeff: Thanks for taking the time. Yeah, leaving the control group out would be Ok.

Sign in to comment.

Accepted Answer

Jeff Miller
Jeff Miller on 26 Sep 2020
tbl = readtable("libro6.xlsx");
% Remove control group
control = tbl.Exp_Group == 9;
tbl(control,:) = [];
% Define & fit repeated measures model,
% almost the same as fisheriris at
% https://www.mathworks.com/help/stats/repeatedmeasuresmodel.manova.html
Meas = table([1 2 3 4]','VariableNames',{'Measurements'});
rm = fitrm(tbl,'P1-P4~Factor1*Factor2*Factor3','WithinDesign',Meas);
% manova calculations
man = manova(rm)

More Answers (0)

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!