How to use division in lm

牧云@^-^@ 提交于 2020-01-14 08:15:07

问题


I would like to use lm to predict y by a/b (the quotient of a by b) when I do lm(y~a/b) I get a and b interactions, how can I do ?


回答1:


lm(y~I(a/b))

This is covered in ?formula.



来源:https://stackoverflow.com/questions/21587784/how-to-use-division-in-lm

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!