first draft of linear model
Merge pull request #185 from mikedewar/linear

first draft of linear model