lmp | R Documentation |
Extract F-test p-value from a linear model object. Can also use broom::glance(fit)
.
lmp(modelobject)
modelobject |
A model object of class |
The p-value on the f-test of a linear model object testing the null hypothesis that R^2==0.
# simulate some (e.g. SNP genotype) data
set.seed(42)
n=20
d=data.frame(x1=rbinom(n,2,.5), x2=rbinom(n,2,.5))
d=transform(d, y=x1+x2+rnorm(n))
#fit the linear model
fit=lm(y ~ x1 + x2, data=d)
#shows that the F-test is 0.006641
summary(fit)
#can't access that p-value using this
names(summary(fit))
# this doesn't work either
names(fit)
lmp(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.