statquant
statquant

Reputation: 14380

How to use division in lm

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 ?

Upvotes: 7

Views: 4455

Answers (1)

Sycorax
Sycorax

Reputation: 1386

lm(y~I(a/b))

This is covered in ?formula.

Upvotes: 13

Related Questions