Groups in anova1

2 次查看(过去 30 天)
Antonie Brozova
Antonie Brozova 2018-6-1
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.

回答(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