[R] Help : glm p-values for a factor predictor
Fox, John
jfox at mcmaster.ca
Thu Jun 29 15:14:59 CEST 2017
Hi Michael,
> -----Original Message-----
> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Michael
> Friendly
> Sent: Thursday, June 29, 2017 9:04 AM
> To: Benoît PELE <benoit.pele at acoss.fr>; r-help at r-project.org
> Subject: Re: [R] Help : glm p-values for a factor predictor
>
> On 6/29/17 11:13 AM, Benoît PELE wrote:
> > My question is about the factor predictors with several levels. R
> > provides only the pvalues for each level whereas i need an overall
> > pvalue for testing the predictor.
>
> What you ask is provided by anova() -- type I tests, and car::Anova() -- Type II
> & III tests.
>
> Factors in stepwise methods must be handled specially, to allow all levels to
> be included/excluded together. I don't know of R software that does this.
The step() function and stepAIC() in MASS both keep terms together and obey marginality.
Best,
John
>
> HTH
>
> -Michael
>
> ______________________________________________
> 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.
More information about the R-help
mailing list