📅  最后修改于: 2022-03-11 14:59:44.542000             🧑  作者: Mango
lmp <- function (modelobject) {
if (class(modelobject) != "lm") stop("Not an object of class 'lm' ")
f <- summary(modelobject)$fstatistic
p <- pf(f[1],f[2],f[3],lower.tail=F)
attributes(p) <- NULL
return(p)
}
> lmp(modelobject)
[1] 1.622665e-05