How to plot a comparisson of two fixed categorical values for linear regression of another continuous variable

前端 未结 3 1201
情书的邮戳
情书的邮戳 2021-01-25 01:42

So I want to plot this:

lmfit = lm (y ~ a + b)

but, \"b\" only has the values of zero and one. So, I want to plot two separate regre

3条回答
  •  清酒与你
    2021-01-25 02:41

    Unless I've misunderstood the question, all you have to do is run abline again but on a model without the b term.

    abline(lm(y~a),col="red",lwd=2)
    

提交回复
热议问题