Groups in anova1

6 vues (au cours des 30 derniers jours)
Antonie Brozova
Antonie Brozova le 1 Juin 2018
Commenté : Antonie Brozova le 3 Juin 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.
  1 commentaire
Antonie Brozova
Antonie Brozova le 3 Juin 2018
already answered

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Analysis of Variance and Covariance dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by