model from R for plot