Groups in anova1

조회 수: 2 (최근 30일)
Antonie Brozova
Antonie Brozova 2018년 6월 1일
댓글: Antonie Brozova 2018년 6월 3일
Hi everyone, I am trying to use anova1 on data from a table, where I changed some some groups, but for some reason, it uses the old groups. Here is my code
L = pizzasize;
ind = find(L.CrustDescription == 'MidCrust');
L.CrustDescription(ind) = 'Mid';
ind = find(L.CrustDescription == 'ClassicCrust');
L.CrustDescription(ind) = 'Mid';
ind = find(L.CrustDescription == 'ThinNCrispy');
L.CrustDescription(ind) = 'Thin';
ind = find(L.CrustDescription == 'ThinCrust');
L.CrustDescription(ind) = 'Thin';
in the table there is column CrustDescription and I changed the values to have only 3 groups" Thin, Mid and DeepPan. I another column I have store, that sold the pizza, Dominos or EagleBoys and in the last one there is Diameter of the pizza. But when I use anova to Diameters of types of crust of Dominos pizzas, it uses also the crust types I have changed.
indD = find(L.Store == 'Dominos');
[pd, td, sd] = anova1(L.Diameter(indD), L.CrustDescription(indD))
sd =
struct with fields:
gnames: {7×1 cell}
n: [0 40 0 0 0 42 43]
source: 'anova1'
means: [NaN 26.6900 NaN NaN NaN 26.7533 28.8144]
df: 122
s: 0.6137
Do you have any idea, what I am doing wrong? Thanks for help.
  댓글 수: 1
Antonie Brozova
Antonie Brozova 2018년 6월 3일
already answered

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

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