wanova
Version 1.0.1.0 (2.2 KB) by
Andrew Penn
Performs Welch's alternative to one-way analysis of variance (ANOVA).
% Function File: [p, F, df1, df2] = wanova (y, g)
%
% Perform a Welch's alternative to one-way analysis of variance
% (ANOVA). The goal is to test whether the population means of data
% taken from k different groups are all equal. This test does not
% require the condition of homogeneity of variances be satisfied.
% For post-tests, it is recommended to run the function 'multicmp'.
%
% Data should be given in a single vector y with groups specified by
% a corresponding vector of group labels g (e.g., numbers from 1 to
% k). This is the general form which does not impose any restriction
% on the number of data in each group or the group labels.
%
% Under the null of constant means, the Welch's test statistic F
% follows an F distribution with df1 and df2 degrees of freedom.
%
% The p-value (1 minus the CDF of this distribution at F) is
% returned in the p output variable.
%
% Bibliography:
% [1] Welch (1951) On the Comparison of Several Mean Values: An
% Alternative Approach. Biometrika. 38(3/4):330-336
% [2] Tomarken and Serlin (1986) Comparison of ANOVA alternatives
% under variance heterogeneity and specific noncentrality
% structures. Psychological Bulletin. 99(1):90-99.
Cite As
Andrew Penn (2024). wanova (https://www.mathworks.com/matlabcentral/fileexchange/61661-wanova), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2007a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on ANOVA in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.