R/other.R

# @ returns - P values of linear model
# @ param modelobject - Linear model
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)
}
trashprogrammer/stocks2 documentation built on May 19, 2019, 6:23 p.m.