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 ?

有帮助吗?

解决方案

lm(y~I(a/b))

This is covered in ?formula.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top