Learn R Programming

glmbb (version 0.5-1)

tidy.formula.hierarchical: 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

tidy.formula.hierarchical(formula)

Arguments

formula

an object of class "formula".

Value

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

Examples

Run this code
# NOT RUN {
tidy.formula.hierarchical(y ~ u + v + w + u:v + u:w + v:w + u:v:w)
# }

Run the code above in your browser using DataLab