ANOVA result No p-value.
3 ビュー (過去 30 日間)
古いコメントを表示
Kaminosono Shougo
2022 年 11 月 24 日
コメント済み: Kaminosono Shougo
2023 年 1 月 17 日
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 件のコメント
採用された回答
Jeff Miller
2022 年 11 月 24 日
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.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で ANOVA についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!