Running anovan on a Large (21504Rx90C) matrix

조회 수: 5 (최근 30일)
John Smith
John Smith 2020년 11월 6일
댓글: John Smith 2020년 11월 10일
I am currently attempting to run a full anovan model on a 21504Rx90C matrix, which results in an out-of-memory error. I am doing this in order to extract the sum of squares contribution of each factor used in the anova model.
The anova model itself has 7 factors with 3,4,4,4,7,4,4 levels respectively. I was wondering if there was perhaps a way of breaking down the code to avoid running into this error and staying within the memory constraints?
Dummy code below:
Data = randn(21504,90)
SumSq = zeros(190,size(Data,2));
for iii = 1:size(Data,2)
[~,tbl,~,~] = anovan(Data(:,iii),{var1 var2 var3 var4 var5 var6 var7},...
'model','full',...
'varnames',{'var1','var2','var3','var4','var5','var6','var7'});
SumSq(1:end,iii) = cell2mat(tbl(2:end,2));
iii
end
  댓글 수: 4
Jeff Miller
Jeff Miller 2020년 11월 9일
편집: Jeff Miller 2020년 11월 9일
See chapter 9 of this book
Watch out for numerical problems, though.
John Smith
John Smith 2020년 11월 10일
Thank you. I will try and implement this method and see if I have any luck.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile 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!

Translated by