Why am I receiving this error when using the vartestn function?

조회 수: 2 (최근 30일)
Victoria Helm
Victoria Helm 2020년 6월 30일
댓글: Victoria Helm 2020년 7월 1일
I tried the following code and received this error:
>> vartestn(Table.trialNum,Table.Sex,Table.ID,'TestType','LeveneQuadratic');
Error using internal.stats.parseArgs (line 42)
Wrong number of arguments.
Error in vartestn (line 98)
internal.stats.parseArgs(okargs,defaults,varargin{:});
Can anyone help me understand what these errors mean?

채택된 답변

Adam Danz
Adam Danz 2020년 7월 1일
편집: Adam Danz 2020년 7월 1일
In the code you shared, I see 3 inputs and one name-value pair.
vartestn(Table.trialNum, Table.Sex, Table.ID, 'TestType', 'LeveneQuadratic');
The syntax described in the documentation describes a max of 2 inputs followed by name-value pairs.
Furthermore, from the documentation, x can be specified as a matrix or column vector. If a grouping variable group is specified, then x must be a column vector. So, you have 1 too many inputs.
Decide which variable is your grouping variable and which variable contains the data you're testing.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Hypothesis Tests에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by