reg function

New generic for regression with matrix distributions