Dear all, Anova() for .car package retrieves Chi-square statistics when I'm testing a model the significance of a multivariate .gls model gls(x~1+2+3+x,corBrownian(phy=tree), ...). Is this Chi-square a two-sided test? Thank you. Best, S?rgio.
Chi-square test
4 messages · Sergio Ferreira Cardoso, John Fox, David Winsemius
Dear Sergio, You appear to have asked this question twice on r-help. Anova() has no specific method for ?gls? models (I assume, though you don?t say so, that the model is fit by gls() in the nlme package), but the default method works and provides Wald chi-square tests for terms in the model. I don?t understand the model formula x ~ 1 + 2 + 3 + x, however, and so I have no idea what gls() would do with this model, other than report an error. Perhaps you can show us the output ? or, better yet, provide a reproducible example. As a general matter, for 1-df terms in an additive model, the 1-df chi-square values reported by Anova() will simply be the squares of the corresponding Wald statistics (labelled ?t? I believe) reported in the summary of the model. Although the p-value is from the upper tail of the chi-square distribution, the test is inherently two-sided. Best, John ------------------------------------------------- John Fox, Professor McMaster University Hamilton, Ontario, Canada Web: http::/socserv.mcmaster.ca/jfox
On Jan 20, 2017, at 8:36 AM, Sergio Ferreira Cardoso <sergio.ferreira-cardoso at umontpellier.fr> wrote: Dear all, Anova() for .car package retrieves Chi-square statistics when I'm testing a model the significance of a multivariate .gls model gls(x~1+2+3+x,corBrownian(phy=tree), ...). Is this Chi-square a two-sided test? Thank you. Best, S?rgio. [[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
On Jan 20, 2017, at 7:36 AM, Sergio Ferreira Cardoso <sergio.ferreira-cardoso at umontpellier.fr> wrote: Dear all, Anova() for .car package retrieves Chi-square statistics when I'm testing a model the significance of a multivariate .gls model gls(x~1+2+3+x,corBrownian(phy=tree), ...). Is this Chi-square a two-sided test?
that If you explain what you mean by a "2-sided test" we might be able to help. It?s unlikely that the author set up the test so that it would fail when the fit was so good that the chi-square statistic was very small, but it?s also likely that departures from the implicit hypothesis of all the coefficients being identity 0 would have raised the chi-square statistic away from zero. ? David.
Thank you. Best, S?rgio. [[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
David Winsemius, MD Alameda, CA, USA
2 days later
Dear David and John, Thank you for your replies. Indeed I'm using ape and nlme packages. Here it is:
fit<-gls(fcl~mass+activity+agility,correlation=corBrownian(phy=tree),data=df,method="ML",weights=varFixed(~vf)) Anova(fit)
Analysis of Deviance Table (Type II tests)
Response: fcl
Df Chisq Pr(>Chisq)
mass 1 0.1756 0.6752
activity 2 0.5549 0.7577
agility 4 3.2903 0.5105
Anyway, I have the help I was looking for. Thank you vey much.
Best regards,
S?rgio.
----- Mensagem original -----
De: "Fox, John" <jfox at mcmaster.ca> Para: "Sergio Ferreira Cardoso" <sergio.ferreira-cardoso at umontpellier.fr> Cc: "R-help list" <r-help at r-project.org> Enviadas: S?bado, 21 De Janeiro de 2017 6:09:22 Assunto: Re: [R] Chi-square test
Dear Sergio, You appear to have asked this question twice on r-help. Anova() has no specific method for ?gls? models (I assume, though you don?t say so, that the model is fit by gls() in the nlme package), but the default method works and provides Wald chi-square tests for terms in the model. I don?t understand the model formula x ~ 1 + 2 + 3 + x, however, and so I have no idea what gls() would do with this model, other than report an error. Perhaps you can show us the output ? or, better yet, provide a reproducible example. As a general matter, for 1-df terms in an additive model, the 1-df chi-square values reported by Anova() will simply be the squares of the corresponding Wald statistics (labelled ?t? I believe) reported in the summary of the model. Although the p-value is from the upper tail of the chi-square distribution, the test is inherently two-sided. Best, John ------------------------------------------------- John Fox, Professor McMaster University Hamilton, Ontario, Canada Web: http::/socserv.mcmaster.ca/jfox
On Jan 20, 2017, at 8:36 AM, Sergio Ferreira Cardoso <sergio.ferreira-cardoso at umontpellier.fr> wrote: Dear all, Anova() for .car package retrieves Chi-square statistics when I'm testing a model the significance of a multivariate .gls model gls(x~1+2+3+x,corBrownian(phy=tree), ...). Is this Chi-square a two-sided test? Thank you. Best, S?rgio. [[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.