ANOVA result No p-value.
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kaminosono Shougo
am 24 Nov. 2022
Kommentiert: Kaminosono Shougo
am 17 Jan. 2023
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)
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'});
0 Kommentare
Akzeptierte Antwort
Jeff Miller
am 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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu ANOVA finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!