[R] Getting Pr from Summary(lm)
Torsten Hothorn
Torsten.Hothorn at rzmail.uni-erlangen.de
Wed Jun 9 12:27:28 CEST 2004
> Hello,
>
> I am trying to get the P values from the output of a summary for lm.
>
> lm <- lm(y ~ age + sex)
> s <- summary(lm)
s$coefficients
gives you a matrix with the P-values in the fourth column
Torsten
>
> I thought that I might be able to get them using a combination of scan,
> grep and sub.
> But I got stuck on the first step - being able to process "s" as a text
> string.
> I could perhaps write it to file than scan it back but there is probably
> an easier
> way to do the whole thing.
>
> Help would be welcome, David
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>
More information about the R-help
mailing list