[R] Did the output from summary(lm(...)) change

Rui Barradas ru|pb@rr@d@@ @end|ng |rom @@po@pt
Sat Jan 25 00:09:07 CET 2020


Hello,

No, your memory is wrong, like you say.

summary(lm(.)) returns a matrix with the 4th column named "Pr(>|t|)", 
not "p.value". And this hasn't changed. If you want the p-values, the 
(old) way to do it still is

summary(lm(.))$coefficients[, 4]

or, more complicated,

summary(lm(.))$coefficients[, "Pr(>|t|)"]


Hope this helps,

Rui Barradas


Às 21:27 de 24/01/20, Dennis Fisher escreveu:
> R 3.6.1
> OS X
> 
> Colleagues
> 
> My recollection (possibly wrong) is that:
> 	summary(lm(YVAR ~ XVAR))$p.value
> used to return the P value for a linear regression.  It does not appear to do so now.
> Of note:
> 	summary(lm(YVAR ~ XVAR))
> does report the P value.
> 
> I realize that I can access the P value from:
> 	summary(lm(YVAR ~ XVAR))$coeff
> but I am curious as to whether my memory is flawed.
> 
> Dennis
> 
> Dennis Fisher MD
> P < (The "P Less Than" Company)
> Phone / Fax: 1-866-PLessThan (1-866-753-7784)
> www.PLessThan.com <http://www.plessthan.com/>
> 
> 
> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help using 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