필터 지우기
필터 지우기

Unbalanced ANOVAN data preparation

조회 수: 2 (최근 30일)
Siddhartha Dhiman
Siddhartha Dhiman 2018년 4월 8일
Using this picture as an example, I have two histograms represented as lines (done using my own binning code). These histograms represent binning of pairwise correlations between genes. This graph is split into three correlation zones (Mid, High and Very High) for the two histograms. I extracted the all the pairwise correlations in each of these zones for the two histograms, giving me a total of 6 variables:
  1. Mid - N
  2. High - N
  3. Very High - N
  4. Mid - NTK
  5. High - NTK
  6. Very High - NTK
The length of each variable is different, hence it calls for an unbalanced ANOVA.
I'd like to run a two-way ANOVA to determine all possible interactions. If N and NTK are my two independent variables and correlations zones are independent, I believe I can phrase the problem in tabular form as:
Mid High Very High
N 6000 3000 1000
NTK 5000 4000 1500
The numbers represent the number of pairwise correlations in a group. So N - Mid has 6000 pairwise correlations stored in variable 'c1MiddleExport'. Question is, how does this go into MATLAB? I have tried the following
aData = vertcat(c1MiddleExport.Corr,c1HighExport.Corr,...
c1VeryHighExport.Corr,c2MiddleExport.Corr,c2HighExport.Corr,...
c2VeryHighExport.Corr);
g1 = repmat({'Mid-N'},[height(c1MiddleExport) 1]);
g2 = repmat({'High-N'},[height(c1HighExport) 1]);
g3 = repmat({'vHigh-N'},[height(c1VeryHighExport) 1]);
g4 = repmat({'Mid-NTK'},[height(c2MiddleExport) 1]);
g5 = repmat({'High-NTK'},[height(c2HighExport) 1]);
g6 = repmat({'vHigh-NTK'},[height(c2VeryHighExport) 1]);
g7 = repmat({'N'},[(height(c1MiddleExport)+height(c1HighExport)+...
height(c1VeryHighExport)) 1]);
g8 = repmat({'NTK'},[(height(c2MiddleExport)+height(c2HighExport)+...
height(c2VeryHighExport)) 1]);
corrGroups = vertcat(g1,g2,g3,g4,g5,g6);
condGroups = vertcat(g7,g8);
[p,table,stats,terms] = anovan(aData,{corrGroups condGroups},...
'model','interaction',...
'varnames',{'Correlation','Conditions'},...
'display','on');
Variable representation is as follows:
  1. c1MiddleExport --> Mid - N
  2. c1HighExport --> High - N
  3. c1VeryHighExport --> Very High - NTK
  4. c2MidExport --> Mid - NTK
  5. c2HighExport --> High - NTK
  6. c2VeryHighExport --> Very High - NTK
This however yields the following results:
This is not what I am looking for and it seems wrong. I've tried this so many ways and I cannot for the life of me figure it out. I'd appreciate if someone could help me out here.

답변 (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