フィルターのクリア

Error using accumarray: First input SUBS must contain positive integer subscripts?

1 回表示 (過去 30 日間)
Maria
Maria 2014 年 10 月 20 日
コメント済み: Todor 2014 年 11 月 7 日
Hi all,
I have tried Matlab function ranova but get an error:
Error using accumarray First input SUBS must contain positive integer subscripts.
Error in RepeatedMeasuresModel>makeTestA (line 2172) termsize = accumarray(this.CoefTerms',1);
Error in RepeatedMeasuresModel/ranova (line 659) [A,Anames] = makeTestA(this);
Could someone please let me know how to solve this problem?
Here is how I have tried ranova:
t = table(subjects,means(:,1),means(:,2),means(:,3),'VariableNames',{'sessions','s1','s2','s3'});
t =
sessions s1 s2 s3
_________ ______ ______ ______
'subject' 5.0463 5.3267 5.5495
'subject' 6.0667 7.087 3.322
'subject' 3.1313 7.4503 3.2299
'subject' 16.412 6.1687 5.0404
'subject' 8.824 14.683 6.7319
'subject' 3.8126 2.8653 3.6366
'subject' 27.42 9.1804 8.0514
'subject' 7.0583 4.9728 4.2714
'subject' 3.7724 5.1526 5.678
'subject' 12.036 4.4427 14.088
'subject' 8.5065 5.4886 3.7804
'subject' 6.64 10.418 6.3139
'subject' 5.1549 19.468 9.2322
'subject' 4.6753 4.4866 5.7057
'subject' 3.3991 3.551 3.6003
'subject' 10.692 11.041 4.9977
rm = fitrm(t,'s1-s3~sessions') rm =
RepeatedMeasuresModel with properties:
Between Subjects:
BetweenDesign: [16x4 table]
ResponseNames: {'s1' 's2' 's3'}
BetweenFactorNames: {'sessions'}
BetweenModel: '1 + sessions'
Within Subjects:
WithinDesign: [3x1 table]
WithinFactorNames: {'Time'}
WithinModel: 'separatemeans'
Estimates:
Coefficients: [1x3 table]
Covariance: [3x3 table]
ranovatbl = ranova(rm)
Thanks, Maria
  1 件のコメント
Todor
Todor 2014 年 11 月 7 日
Hi Maria,
try using this: rm = fitrm(t,'s1-s3~1')
Sincerely, Todor

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeRepeated Measures and MANOVA についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by