Shorten a Hierarchical Formula

Description

Simplify a formula, assuming it is hierarchical, that is, an interaction implies all lower-order interactions and main effects involving the same variables are in the model.

Usage

1

Arguments

formula

an object of class "formula".

Value

A character string coercible to a formula equivalent to the input.

Examples

1
tidy.formula.hierarchical(y ~ u + v + w + u:v + u:w + v:w + u:v:w)