octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

One- and two-way ANOVA


From: Dupuis
Subject: One- and two-way ANOVA
Date: Thu, 6 Mar 2008 14:09:57 -0800 (PST)

I'm getting ready to analyse a measurement campaign involving two factors ...
and noticed the Octave implementation of ANOVA can only deal with one
factor. I modified it a bit, to perform one-way of
two-way ANOVA according to the input:
- call with one argument => it must be a matrix, rows are repetitions, each
column is associated with one level of a factor. One-way ANOVA.
- call with two arguments
  - both are vectors => data and one set of group. One-way.
  - first is a matrix, the second is either a vector whose length is equal
to the number of rows of the matrix, either a matrix of the same size =>
each colum is associated with one level of the 'column'

For one-way, computes the Within-group, Bewteen-group and Total
sum-of-squares, with are further scaled to compute corresponding variances
and F test. For two-way, the within-group is split as row
factor, colum factor and interaction. This produces three variances and F
test.

The target is different from MANOVA, which rests upon the hypothesis that
data in one group are samples of a normal distribution with VECTOR mean and
a square variance-covariance matrix.

The working was verified against data published on
1)http://www.itl.nist.gov/div898/handbook/prc/section4/prc438.htm
2)http://faculty.vassar.edu/lowry/ch16pt2.html
Note that in the second exemple given in
http://faculty.vassar.edu/lowry/ch16pt3.html¸there is a small mistake in the
computations, the SST is slightly incorrect.

Would it be possible to test the enclosed file, and replace
/usr/share/octave/3.0.0/m/statistics/tests/anova.m
with it ? As the old behaviour, in the case of one-way, is unmodified, I
guess there shouldn't be a name change. 

Regards

Pascal Dupuis

http://www.nabble.com/file/p15885357/anova.m.diff anova.m.diff 
-- 
View this message in context: 
http://www.nabble.com/One--and-two-way-ANOVA-tp15885357p15885357.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]