ModelMatrix function

Model matrix from hierarchies and/or a formula