multcompare and anovan result in zero and nan
6 次查看(过去 30 天)
显示 更早的评论
I want to perform a multcompare test on my data set and find which parameter or the cobination of parameters can change the mean value of my response value. Here is the code I use:
%%
X = readtable('HHH.xlsx','sheet',3);
y=[X.UL]';
g1=X.Type;
g2=X.ThicknessSP;
g3=X.ThicknessDP;
g4=X.Weight;
g5=X.Adhesion;
[~,~,stats] = anovan(y,{g1 g2 g3 g4 g5},'model','interaction',...
'varnames',{'g1','g2','g3','g4','g5'});
But what I get is all Nan and zeros.
Can you please help me?
I have attached my data.
Thanks
采纳的回答
Jeff Miller
2019-3-23
You can't use anovan with numerical predictors like thickness, weight, and adhesion. Have a look at regression models. You will probably need a lot more data, though, to separate out the effects of these different predictors.
5 个评论
Jeff Miller
2019-3-27
I suspect you don't have enough data to estimate all the two-way interactions (i.e., empty cells in some of the 2x2 designs). Does it work with 'model','linear'? This might be all that can be computed with your data set. Or maybe you can get some of the 2-way interactions using a 'terms' matrix. But evidently you cannot get all of the 2-way interactions, which is what you are asking for with 'model','interaction'.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Analysis of Variance and Covariance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!