Sie verfolgen jetzt diese Einreichung
- Aktualisierungen können Sie in Ihrem Feed verfolgter Inhalte sehen.
- Je nach Ihren Kommunikationseinstellungen können Sie auch E-Mails erhalten.
function [p,atab] = levenes(data,grp)
Implements Levene's test for the mogeneity of variance.
Can be used on any data suitable for an n-way ANOVA.
Parameters:
data and grp are identical to the first two parameters passed to
MatLab's anovan function. Type 'help anovan' for details.
data should be a vector with measurement data (the dependent variable).
grp should be a 1 x nVar cell array, where nVar is the number of
variables (or factors). Each cell of grp should be a vector of same size
as data used as a grouping variable (as in anovan.m).
Returns:
p and atab are the same as the first two values returned from anovan.
p is the probability of a difference in variance among the different
cells in the data matrix greater than or equal to the one in data.
atab is the usual information from an ANOVA, eg.:
'Source' 'Sum Sq.' 'd.f.' 'Singular?' 'Mean Sq.' 'F' 'Prob>F'
'X1' [ 0.0416] [ 3] [ 0] [ 0.0139] [0.2797] [0.8400]
'Error' [30.3020] [ 612] [ 0] [ 0.0495] [] []
'Total' [30.3436] [ 615] [ 0] [] [] []
Notes:
The solution here is based on the fact that Levene's test is equivalent
to the following:
Let D = abs(y(i,j) - y_hat(.,j))
Where i is the data index and j indexes cell membership, and y_hat
is the within-cell mean ("cell" here referring to the cells of a data
matrix of).
Then perform a one-way ANOVA with D as the dependent variable.
* Requires MatLab's statistics toolbox.
Aaron Schurger
June 2007
Zitieren als
Aaron Schurger (2026). Levene's test for homogeneity of variance (https://de.mathworks.com/matlabcentral/fileexchange/44415-levene-s-test-for-homogeneity-of-variance), MATLAB Central File Exchange. Abgerufen .
Allgemeine Informationen
- Version 1.1.0.0 (2,09 KB)
Kompatibilität der MATLAB-Version
- Kompatibel mit allen Versionen
Plattform-Kompatibilität
- Windows
- macOS
- Linux
| Version | Veröffentlicht | Versionshinweise | Action |
|---|---|---|---|
| 1.1.0.0 | Some editing of the comments. |
||
| 1.0.0.0 |
