I'm making up this scenario for illustration of my question.

Let's say I have factor A: low level 10 high level 30

And factor B: low level 5 high level 15

I have a quantitative response of interest. I can choose to compare means in the typical design setting. Or I can construct two regression models to study the relationship between factor and response. My question: What is the difference between treating these levels as categorical vs. quantitative?

first model: y = b0 + b1*Xa + b2*Xb + b3*XaXb

where Xa=1 if low level A and 0 otherwise. Xb=1 if low level B and 0 otherwise XaXb=1 if low level A and low level B

second model: y= b0 +b1*Xa + b2*Xb + b3*XaXb

where Xa and Xb are quantitative predictors

I understand that If I have more than two levels per factor the second model will save me some degrees of freedom. But when I have two levels, the benefit isn't as clear to me.

Let's say I have factor A: low level 10 high level 30

And factor B: low level 5 high level 15

I have a quantitative response of interest. I can choose to compare means in the typical design setting. Or I can construct two regression models to study the relationship between factor and response. My question: What is the difference between treating these levels as categorical vs. quantitative?

first model: y = b0 + b1*Xa + b2*Xb + b3*XaXb

where Xa=1 if low level A and 0 otherwise. Xb=1 if low level B and 0 otherwise XaXb=1 if low level A and low level B

second model: y= b0 +b1*Xa + b2*Xb + b3*XaXb

where Xa and Xb are quantitative predictors

I understand that If I have more than two levels per factor the second model will save me some degrees of freedom. But when I have two levels, the benefit isn't as clear to me.

Last edited: