is.empty.model
Does a Model Contain any Predictors

Description

Report if a model or formula contains any predictor terms.

Usage

is.empty.model(x)

Arguments

x a model object, formula, or something that terms(x) can turn into a terms object.
Value
a A logical value saying if the model represented by that formula has any predictors in it.
See Also
lm, terms, formula.
Examples
is.empty.model(lm(Fuel ~ -1, data=Sdatasets::fuel.frame))
is.empty.model(response ~ -1)
is.empty.model(response ~ 1)
Package stats version 6.0.0-69
Package Index