ANOVA result No p-value.

2 visualizzazioni (ultimi 30 giorni)
Kaminosono Shougo
Kaminosono Shougo il 24 Nov 2022
I was using ANOVA, but when I changed the display of results from "interaction" to "full", the p-value was not displayed.
I would like to know if anyone knows what the problem is.
dataFileName1 = 'AllParameter_Exp2';
dataFileID1 = fopen([dataFileName1,'.txt'],'r');
if (dataFileID1 == -1);
error('data file not exist');
end
formatSpec = '%f';
y = fscanf(dataFileID1,formatSpec)
y = 90×1
58.6870 65.6794 44.2342 36.2030 0.0007 45.4349 0.0277 44.6501 54.4564 0.0011
fclose(dataFileID1);
g1 = [1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10];
g2 = [1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3];
g3 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3];
%{
par = num2cell(g1);
sti = cellstr(g2);
sub = cellstr(g3);
%}
p = anovan(y,{g1,g2,g3},'Model','full','Varnames',{'parameter','stimuli','subjects'});

Risposta accettata

Jeff Miller
Jeff Miller il 24 Nov 2022
The problem is that the full model has 90 parameters and predicts a separate mean for each of the 3*3*10 conditions. But you only have 90 observations, so there are no left-over degrees of freedom to estimate an error term. No error term => no F's or p's.
Your only options are to (a) fit a simpler model (e.g., with just 'interaction') or (b) get multiple data values within at least some of the 90 cells so that you have more data than cells and thus some d.f.'s to estimate an error term.
  1 Commento
Kaminosono Shougo
Kaminosono Shougo il 17 Gen 2023
Thank you! This problem have been solved.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by