Skip to content
Prev 176149 / 398503 Next

extract the p value of F statistics from the lm class

Hi,

what about the following:

## some test data
x <- 1:10
y <- x + rnorm(x)

## model and summary
m <- lm(y~x)
sm <- summary(m)
sm

# str(sm)
# sm$fstatistic

## and now: the manual case
1 - pf(sm$fstatistic[1], sm$fstatistic[2], sm$fstatistic[3])


Hope it helps, ThPe


tedzzx schrieb: