필터 지우기
필터 지우기

vartestn error line 272

조회 수: 2 (최근 30일)
Thibaut Deville
Thibaut Deville 2020년 6월 9일
댓글: Chidvi Modala 2020년 6월 23일
Hi everyone,
I'm trying to make vartestn works but everytime I get :
Unrecognized function or variable 'testname'.
Error in vartestn (line 272)
Table{k+4,1} = testname;
Error in Statistiques (line 69)
HO_ini(counter,1).data=vartestn([A';B'],'TestType','LeveneAbsolute')
Could someone help me to solve this problem ?
A part of my currently code if it could help :
HO_ini=vartestn([A';B'],'TestType','LeveneAbsolute')
Best,
Thibaut Deville.

채택된 답변

Chidvi Modala
Chidvi Modala 2020년 6월 16일
Are you trying to use the Levene's tests for data with a single group?
  댓글 수: 3
Chidvi Modala
Chidvi Modala 2020년 6월 18일
This is a bug. I have brought this issue to the notice of our developers and will try to fix it in future releases.
Chidvi Modala
Chidvi Modala 2020년 6월 23일
The vartestn function wants data as the first input and grouping information as the second. It looks like you are supplying the first data sample as the first input and the second data sample as the second. May be you can change the code from
p(counter,1) = vartestn(A,B,'TestType','LeveneAbsolute');
to
p(counter,1) = vartestn([A;B],[zeros(size(A));ones(size(B))],'testtype','leveneabsolute')
Also the original line of code above is defining a series of single-observation groups. It is not possible to estimate the variance from single observations, so the vartestn is going into a piece of code to deal with this edge case of no information.

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

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