View source: R/has_intercept.R
| has_intercept | R Documentation | 
Checks if model has an intercept.
has_intercept(x, verbose = TRUE)
x | 
 A model object.  | 
verbose | 
 Toggle warnings.  | 
TRUE if x has an intercept, FALSE otherwise.
model <- lm(mpg ~ 0 + gear, data = mtcars)
has_intercept(model)
model <- lm(mpg ~ gear, data = mtcars)
has_intercept(model)
model <- lmer(Reaction ~ 0 + Days + (Days | Subject), data = sleepstudy)
has_intercept(model)
model <- lmer(Reaction ~ Days + (Days | Subject), data = sleepstudy)
has_intercept(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.