as_model_df function

Expand data.frame into a design matrix