is.empty.model

0th

Percentile

Test if a Model's Formula is Empty

R's formula 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.

Keywords
models
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

Aliases
  • is.empty.model
Examples
library(stats) # NOT RUN { y <- rnorm(20) is.empty.model(y ~ 0) is.empty.model(y ~ -1) is.empty.model(lm(y ~ 0)) # }
Documentation reproduced from package stats, version 3.5.0, License: Part of R 3.5.0

Community examples

Looks like there are no examples yet.