フィルターのクリア

multcompare and anovan result in zero and nan

12 ビュー (過去 30 日間)
sarah Abdellahi
sarah Abdellahi 2019 年 3 月 21 日
コメント済み: Jeff Miller 2019 年 3 月 27 日
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.
Capture.JPG
Can you please help me?
I have attached my data.
Thanks

採用された回答

Jeff Miller
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 件のコメント
sarah Abdellahi
sarah Abdellahi 2019 年 3 月 27 日
Hi Jeff,
I changed my data to groups. My data looks like this:
Capture.JPG
But I still have problem with anovan shown below. Still Nan!
Capture.JPG
Here is the code I used to converd data to groups
Data= readtable('HHH.xlsx','sheet',1);
Th_Weight=4;Th_adhesion=0.8; Th_SP=2.8; Th_DP=5.5; Th_UL=65; % threshholding values
Data_digitized=table(Data.Type, double(Data.ThicknessSP>Th_SP), double(Data.ThicknessDP>Th_DP), double(Data.Weight>Th_Weight), double(Data.Adhesion>Th_adhesion), double(Data.UL));
Data_digitized.Properties.VariableNames =Data.Properties.VariableNames; %generating new table
y=Data_digitized.UL;
gg1=Data_digitized.Type;
gg2=Data_digitized.ThicknessSP';
gg3=Data_digitized.ThicknessDP';
gg4=Data_digitized.Weight';
gg5=Data_digitized.Adhesion';
[~,~,stats] = anovan(y,{gg1 gg2 gg3 gg4 gg5},'model','interaction',...
'varnames',{'gg1','gg2','gg3','gg4','gg5'});
Thanks
Jeff Miller
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 ExchangeAnalysis of Variance and Covariance についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by