Problem with running anova

16 ビュー (過去 30 日間)
Aitana Grasso
Aitana Grasso 2021 年 12 月 8 日
コメント済み: Aitana Grasso 2021 年 12 月 15 日
Hi everyone,
I have a question.
Turns out that when a create a linear model (using fitlm) and than I want to run an anova to that model I get this error:
Error using gather
Too many input arguments.
Error in classreg.regr.CompactLinearModel/componentanova (line 824)
[ss,df,ms,f,pval] = gather(ss,df,ms,f,pval);
Error in classreg.regr.CompactLinearModel/anova (line 319)
tbl = componentanova(model,sstype);
I had checked with colleagues and they don't have a "gather" function in line 824
Line 824: [ss,df,ms,f,pval] = gather(ss,df,ms,f,pval)
Does anyone knows what it could be?
  4 件のコメント
Adam Danz
Adam Danz 2021 年 12 月 15 日
I applied the run feature to your code so we can see the results.
Aitana Grasso
Aitana Grasso 2021 年 12 月 15 日
Hello Adam,
Thank you so much for your help.
Apparently de problem was in my MATLAB, so I had to uninstall and install again.
Now everything is running perfectly!

サインインしてコメントする。

採用された回答

Adam Danz
Adam Danz 2021 年 12 月 8 日
It looks like you've shadowed matlab's gather function with a function or script of the same name.
To see a list of functions named gather,
which gather -all
/MATLAB/toolbox/matlab/bigdata/gather.m /MATLAB/toolbox/matlab/bigdata/@tall/gather.m % Shadowed tall method /MATLAB/toolbox/nnet/deep/@dlarray/gather.m % Shadowed dlarray method /MATLAB/toolbox/parallel/gpu/@gpuArray/gather.m % Shadowed gpuArray method /MATLAB/toolbox/parallel/parallel/@distributed/gather.m % Shadowed distributed method /MATLAB/toolbox/parallel/parallel/@codistributed/gather.m % Shadowed codistributed method
Then remove your shadowed file from the Matlab path or rename the file.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnalysis of Variance and Covariance についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by