Re: [R] How to get the P-values from GLM results?

From: <Bill.Venables_at_csiro.au>
Date: Wed, 19 Mar 2008 17:43:17 +1000

Why use glm(...) for a multiple regression? A multiple regression model is just an LM, not a GLM. glm(...) is the long way round, at best.

___

fm <- lm(y ~ x1+x2+..., data = myData) ## fits the model summary(fm) ## will show you the tests, including p-values

pv <- summary(fm)$coef[, "Pr(>|t|)"] ## will extract them

-----Original Message-----
From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] On Behalf Of Alex Wang
Sent: Wednesday, 19 March 2008 1:51 PM
To: r-help_at_r-project.org
Subject: [R] How to get the P-values from GLM results?

Hello all,

  I have a question concerning how to get the P-value for a explanatory variables based on GLM.

 I'll run multiple regressions with GLM, and I'll need the P-value for the
same explanatory variable from these multiple GLM results.

 I check the help and there are quite a few Value options but I just can
not find anyone about the p-value.

 Could anyone help me with that?

Thanks a lot!

Alex

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
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.

R-help_at_r-project.org mailing list
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. Received on Wed 19 Mar 2008 - 07:46:45 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 19 Mar 2008 - 09:30:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive