Yesica Pallavicini Fernandez
2018-Feb-20 12:48 UTC
[R-es] Incongruencias entre ANOVA y comparación por pares
Hola, he hecho una anova con su posterior comparación de Tukey pero me da un resultado incongruente. Mientras la ANOVA me dice que SI hay diferencias significativas entre variedades ( resaltado en amarillos), la comparación me da todo en la misma letra ( lo que significa que no hay diferencias). Yo esperaba al menos que 1 variedad sea diferente. Ya he revisado los datos y están bien. He realizado los mismos análisis con otros datos y las variedades me dan diferentes entre si. ¿A que se puede deber esta incongruencia? ¿Se puede confiar en el P-valor de este análisis? ¿Me recomiendan alguna otra funcion/librería para este análisis) Gracias summary(Za<-aov(yield~variety*treat*Y+rep,z)) Df Sum Sq Mean Sq F value Pr(>F) variety 23 30.7 1.3 2.396 0.000680 *** treat 1 753.8 753.8 1354.597 < 2e-16 *** Y 1 392.6 392.6 705.634 < 2e-16 *** rep 1 6.1 6.1 10.894 0.001151 ** variety:treat 23 31.1 1.4 2.432 0.000553 *** variety:Y 23 26.9 1.2 2.101 0.003570 ** treat:Y 1 14.8 14.8 26.608 6.21e-07 *** variety:treat:Y 23 13.2 0.6 1.030 0.429382 Residuals 191 106.3 0.6 --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 out<-HSD.test(Za,"variety", group=TRUE,console=TRUE) yield groups Avispa 7.447222 a Pelayo 7.446759 a Regallo 7.423611 a Olivadur 7.395833 a Martinur 7.345833 a Iride 7.315278 a Amilcar 7.303241 a Gallareta 7.223611 a Ramirez 7.127315 a Sula 6.983796 a Sculptur 6.983449 a Claudio 6.971759 a Simeto 6.910648 a Bolo 6.907407 a Vitron 6.896759 a Bolido 6.878704 a Mexa 6.804630 a D.Pedro 6.779630 a Dorondon 6.724537 a D.Ricardo 6.656019 a Burgos 6.582870 a Tussur 6.529514 a D.Sebastian 6.412500 a Kiko.Nick 6.374074 a [[alternative HTML version deleted]]
Francisco Rodríguez
2018-Feb-20 12:56 UTC
[R-es] Incongruencias entre ANOVA y comparación por pares
Antes de hablar de incongruencia habria que especificar si es de la interpretacion o del algoritmo dr R. Para descartar lo ?ltimo compara si puedes con otro softaware, o intenta, si no es muy complicado montar el algoritmo co formulas excel Enviado desde mi smartphone Samsung Galaxy. -------- Mensaje original -------- De: Yesica Pallavicini Fernandez <yesipalla en gmail.com> Fecha: 20/2/18 13:48 (GMT+01:00) Para: r-help-es en r-project.org Asunto: [R-es] Incongruencias entre ANOVA y comparaci?n por pares Hola, he hecho una anova con su posterior comparaci?n de Tukey pero me da un resultado incongruente. Mientras la ANOVA me dice que SI hay diferencias significativas entre variedades ( resaltado en amarillos), la comparaci?n me da todo en la misma letra ( lo que significa que no hay diferencias). Yo esperaba al menos que 1 variedad sea diferente. Ya he revisado los datos y est?n bien. He realizado los mismos an?lisis con otros datos y las variedades me dan diferentes entre si. ?A que se puede deber esta incongruencia? ?Se puede confiar en el P-valor de este an?lisis? ?Me recomiendan alguna otra funcion/librer?a para este an?lisis) Gracias summary(Za<-aov(yield~variety*treat*Y+rep,z)) Df Sum Sq Mean Sq F value Pr(>F) variety 23 30.7 1.3 2.396 0.000680 *** treat 1 753.8 753.8 1354.597 < 2e-16 *** Y 1 392.6 392.6 705.634 < 2e-16 *** rep 1 6.1 6.1 10.894 0.001151 ** variety:treat 23 31.1 1.4 2.432 0.000553 *** variety:Y 23 26.9 1.2 2.101 0.003570 ** treat:Y 1 14.8 14.8 26.608 6.21e-07 *** variety:treat:Y 23 13.2 0.6 1.030 0.429382 Residuals 191 106.3 0.6 --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 out<-HSD.test(Za,"variety", group=TRUE,console=TRUE) yield groups Avispa 7.447222 a Pelayo 7.446759 a Regallo 7.423611 a Olivadur 7.395833 a Martinur 7.345833 a Iride 7.315278 a Amilcar 7.303241 a Gallareta 7.223611 a Ramirez 7.127315 a Sula 6.983796 a Sculptur 6.983449 a Claudio 6.971759 a Simeto 6.910648 a Bolo 6.907407 a Vitron 6.896759 a Bolido 6.878704 a Mexa 6.804630 a D.Pedro 6.779630 a Dorondon 6.724537 a D.Ricardo 6.656019 a Burgos 6.582870 a Tussur 6.529514 a D.Sebastian 6.412500 a Kiko.Nick 6.374074 a [[alternative HTML version deleted]] _______________________________________________ R-help-es mailing list R-help-es en r-project.org https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-help-es&data=02%7C01%7C%7Cf82210b3ff3844fce81808d578604957%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636547277298744079&sdata=AQrzzbSl1AQ42lBMJrpw74W59CDXEr%2FOkdgCqFV6V5k%3D&reserved=0 [[alternative HTML version deleted]]
Marcelino de la Cruz Rot
2018-Feb-20 14:06 UTC
[R-es] Incongruencias entre ANOVA y comparación por pares
Hola. La "incongruencia" puede deberse a que el test de Fisher y el de Tukey se calculan de manera diferente. En este enlace explican esa y alguna otra de las posibles causas: http://www.pmean.com/05/TukeyTest.html Otra de las posibilidades es que las diferencias entre algunas de las variedades sean casi marginales y que tras el ajuste de los p-valores para tener en cuenta los múltiples tests su significación sea > 0.05. Esto lo podrías comprobar usando la función TukeyHSD(), es decir, podrías comprobar qué variedades presentan una diferencia más "próxima a la significación" viendo cuáles de los "p.adj." están más próximos a 0.05 (probablemente sean esos pares de variedades los que causan que el ANOVA sea significativo: TukeyHSD(Za,"variety") Marcelino. El 20/02/2018 a las 13:48, Yesica Pallavicini Fernandez escribió:> Hola, he hecho una anova con su posterior comparación de Tukey pero me da > un resultado incongruente. > Mientras la ANOVA me dice que SI hay diferencias significativas entre > variedades ( resaltado en amarillos), la comparación me da todo en la misma > letra ( lo que significa que no hay diferencias). > Yo esperaba al menos que 1 variedad sea diferente. > > Ya he revisado los datos y están bien. > He realizado los mismos análisis con otros datos y las variedades me dan > diferentes entre si. > > ¿A que se puede deber esta incongruencia? > ¿Se puede confiar en el P-valor de este análisis? > ¿Me recomiendan alguna otra funcion/librería para este análisis) > > Gracias > > summary(Za<-aov(yield~variety*treat*Y+rep,z)) > > Df Sum Sq Mean Sq F value Pr(>F) > variety 23 30.7 1.3 2.396 0.000680 *** > treat 1 753.8 753.8 1354.597 < 2e-16 *** > Y 1 392.6 392.6 705.634 < 2e-16 *** > rep 1 6.1 6.1 10.894 0.001151 ** > variety:treat 23 31.1 1.4 2.432 0.000553 *** > variety:Y 23 26.9 1.2 2.101 0.003570 ** > treat:Y 1 14.8 14.8 26.608 6.21e-07 *** > variety:treat:Y 23 13.2 0.6 1.030 0.429382 > Residuals 191 106.3 0.6 > --- > Signif. codes: > 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 > > out<-HSD.test(Za,"variety", group=TRUE,console=TRUE) > > yield groups > Avispa 7.447222 a > Pelayo 7.446759 a > Regallo 7.423611 a > Olivadur 7.395833 a > Martinur 7.345833 a > Iride 7.315278 a > Amilcar 7.303241 a > Gallareta 7.223611 a > Ramirez 7.127315 a > Sula 6.983796 a > Sculptur 6.983449 a > Claudio 6.971759 a > Simeto 6.910648 a > Bolo 6.907407 a > Vitron 6.896759 a > Bolido 6.878704 a > Mexa 6.804630 a > D.Pedro 6.779630 a > Dorondon 6.724537 a > D.Ricardo 6.656019 a > Burgos 6.582870 a > Tussur 6.529514 a > D.Sebastian 6.412500 a > Kiko.Nick 6.374074 a > > [[alternative HTML version deleted]] > > _______________________________________________ > R-help-es mailing list > R-help-es en r-project.org > https://stat.ethz.ch/mailman/listinfo/r-help-es > . >-- Marcelino de la Cruz Rot Depto. de Biología y Geología Física y Química Inorgánica Universidad Rey Juan Carlos Móstoles España