How to remove intercept in R

后端 未结 2 502
灰色年华
灰色年华 2020-12-01 14:15

I need to create a probit model without the intercept. So, how can I remove the intercept from a probit model in R?

2条回答
  •  醉梦人生
    2020-12-01 15:12

    Also, if you have an existing formula object, foo, you can remove the intercept with update like this:

    foo <- y ~ x1 + x2
    bar <- update(foo, ~ . -1)
    # bar == y ~ x1 + x2 - 1
    

提交回复
热议问题