Search
 
SCRIPT & CODE EXAMPLE
 

R

how to extract p value from lm in r

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
Comment

PREVIOUS NEXT
Code Example
R :: remove rownumbers r 
R :: correlation matrix in r 
R :: how to read csv file in r 
R :: ggplot_regression_line 
R :: libpath r 
R :: ggplot2 graph in r 
R :: how to convert numeric to date in r 
R :: R df space in column name 
R :: disable the y axis in plot r 
R :: mutate in r if else 
R :: how to create for loop through columns and count non na cells by group in r 
R :: create list in r 
R :: How to calculate standardized residuals in R 
R :: r for loop 
R :: bar plot r 
R :: switch to another line in string r 
R :: sparklyr alternative for str_detect 
R :: r: network randomization test igprah stakoverflow 
R :: How to use group_by inside a function? 
R :: Extract the text of all list elements in r from html 
R :: timestamp conversion from excel R 
R :: r runif 
Rust :: print number as binary in rust 
Rust :: how to open a file rust 
Rust :: rust multiline comment 
Rust :: armanriazi•rust•concept•superpowers 
Rust :: what is () in rust 
Rust :: convert path to pathbuf 
Rust :: rust ceil 
Rust :: armanriazi•rust•rc•vs•refcell 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =