anova2 is not working properly
11 views (last 30 days)
Show older comments
Hello,
I have recently taken introductory statistics and used a variety of software aids to get through the course. Primarily I used MS excel because our textbook referenced it heavily. I am now learning how to use Matlab to answer and analyze some of the datasets from my homework sets. In particular, we just covered two-way ANOVA, which is the function anova2 in matlab. To my dismay I have learned that the anova2 function is not working properly on my installed matlab. I used the popcorn example from the matlab documentation for anova2 exactly as prompted in the text and compared the results to the same dataset analyzed in excel. The excel two-way anova worked flawlessly and exactly reproduced the matlab example's output, whereas the matlab anova2 output was completely different and mathematically wrong. What might be wrong with my installed version of matlab?
Thank you,
Mark Lies
0 Comments
Accepted Answer
Wayne King
on 27 Apr 2013
Can you please provide your MATLAB version number? I am able to produce exactly the Anova table shown in the MATLAB documentation for anova2. Are you saying that you get something in MATLAB different from what is shown in the documentation?
If so, the next important question to ask is whether you are sure you are using the MathWorks' anova2 function from the Statistics Toolbox. Often people download some other .m file or have another .m file on their path ahead of a MathWorks' function with the same name. If you enter
>>which anova2
do you get something back like:
matlab\toolbox\stats\stats\anova2.m
More Answers (0)
See Also
Categories
Find more on ANOVA in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!