anova1 to test difference accross values of elements in a row in a matrix, for the columns seperately (seperate anova1 test per column in a matrix)?

2 visualizaciones (últimos 30 días)
I want to run a statistical test on a matrix (which contains averages of a dataset), to see whether there are differences between the values of the elements in the rows, tested statistically per column seperately.
See the example for a clarification:
matrix_averages =
0.0075 0.5051 0.1383 0.7934
0.3143 0.5927 0.4292 0.8169
0.1643 1.5691 0.1727 0.8230
0.1940 0.4792 0.1648 0.8472
-0.9136 0.0809 0.0012 0.8067
I want to run 4 statistical tests seperately, for every column (all the 4 columns/ 4 channels), to test the statistical differences between the values of the elements in the rows (5 values).
I tried several things but I keep getting a p value of NaN. for instance the following:
% anova1 tests: run seperately per channel/column:
vector_averages_channel1 = matrix_averages(:,1);
vector_averages_channel2 = matrix_averages(:,2);
vector_averages_channel3 = matrix_averages(:,3);
vector_averages_channel4 = matrix_averages(:,4);
p = anova1(vector_averages_channel1);
p = anova1(vector_averages_channel2);
p = anova1(vector_averages_channel3);
p = anova1(vector_averages_channel4);
How can I run a proper statistical test, seperately per column/channel, to find statistical differences accros the elements in the row?

Respuesta aceptada

Jeff Miller
Jeff Miller el 15 de Abr. de 2019
You can't statistically compare the values in different rows (e.g., 0.0075 versus 0.3143) using just the averages. The statistical test needs to be able to estimate the random variability associated with each of those numbers, and it can't do that looking only at the averages.
If you have the original data values that went into each one of those averages, you could use those to compare the averages. So, the Y data vector going into anova1 would be [all the cell1 values followed by all the cell2 values followed by...]. You would also need an equal-length group vector giving the cell number for each of the Y values (e.g, [ 1 1 1 1 2 2 2 2 3 3 3 3 ...] with four numbers in each cell--i.e., four numbers going into each average).

Más respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by