This help topic is for R version 0.90. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/is.empty.html
is.empty.model {base}R Documentation

Check if a model is empty

Description

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.

Usage

is.empty.model(x)

Arguments

x

A terms object or an object with a terms method.

Value

TRUE if the model is empty

See Also

lm,glm

Examples

y<-rnorm(20)
is.empty.model(y~0)
is.empty.model(y~-1)
is.empty.model(lm(y~0))

[Package base version 0.90 ]