model-coerce function

Conversion between a model object and a restriction matrix