is.empty.model {stats} | R Documentation |
R model notation allows models with no intercept and no predictors. These require special handling internally. is.empty.model()
checks whether an object describes an empty model.
is.empty.model(x)
x |
A terms object or an object with a terms method. |
TRUE
if the model is empty
y <- rnorm(20) is.empty.model(y ~ 0) is.empty.model(y ~ -1) is.empty.model(lm(y ~ 0))