View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 1.92 KB File ID: #39800 Version: 1.0




Calls ANOVAN, but takes an N-dimensional array as the data.

| Watch this File

File Information

[p, table, stats] = anovanTable(T, varargin)

Syntax exactly as ANOVAN, except X and Y of the linear model are replaced by an N-dimensional array.

Each dimension becomes one factor of the ANOVA design, so if 10 individuals were tested on 2 conditions at 3 timepoints, one would create a 10 x 2 x 3 array.

  T = randn([10 2 3]);
  p = anovanTable(T, ...
    'varnames', {'Individual', 'Condition','Time'}, ...

this is identical to converting your table to a vector Y = T(:), and creating a design matrix X where each row contains the table subscripts of the corresponding item in vector Y.

Repeated measures can be achieved by adding an extra dimension to the array, and using the parameters ('collapse', DIM). If there are different numbers of measurements in each condition, then the extra dimensions can be padded with NaN.

To see the actual arguments that get passed to ANOVAN, you can get the 5th and 6th return values, which correspond to Y and X respectively.

Required Products Statistics and Machine Learning Toolbox
MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us