Groups in anova1

2 Ansichten (letzte 30 Tage)
Antonie Brozova
Antonie Brozova am 1 Jun. 2018
Kommentiert: Antonie Brozova am 3 Jun. 2018
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.

Antworten (0)

Kategorien

Mehr zu Analysis of Variance and Covariance finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by