I'm new to statistics and I would greatly appreciate any help on this. I have a response (heart beat, a numerical variable) and five other independent variables. Four are numerical (Age, Weight, Calcium, and Vitamin1) and the fifth variable is the drug (0 mg, 10 mg, 20 mg). I'm confused on how I should treat the drug. I entered it as (0, 10, 20) and then fitted the following full model:

$y=b_0 + b_1Age + b_2Weight + b_3Calcium + b_4Vit1 + b_5Drug + b_6(Age \cdot Drug)+b_7 (Weight \cdot Drug)+b_8(Calcium \cdot Drug) + b_9(Vit1\cdot Drug)$

and did stepwise regression afterward. My question is: do I have to code drug as factor(Drug)? What is the difference between using Drug as-is (0, 10, 20) compared to coding it as 0, 1, 2. Do I have to create two additional dummy variables for drug? Do I need the interaction term?

It is the idea or the concept and I don't understand. I would greatly appreciate any help.

  • $\begingroup$ Are 0, 10, and 20 the dosages of the drug? Is there a reason for the dosages to only take on these values? In other words, does the variable Drug also signify an experimental group that the subject belongs in? From your question, it was not immediately clear to me how you entered drug in the model. Did you enter it as-is (continuous)? $\endgroup$ – Marquis de Carabas Apr 25 '16 at 3:35

This answer is based on the assumption that the given dosages of Drug--0 mg, 10 mg, and 20 mg--are the only values that the variable can take on in the dataset. Since Drug can only take on 3 values, it is not correct to enter it as continuous as you have done above. When the Drug variable is treated as continuous, the parameter estimate on that variable in a model without interactions (for simplicity sake) can be interpreted as "a 1 mg increase in Drug is associated with a $b_5$ increase in heartbeat." Since you don't have other values for Drug besides 0, 10, and 20, this interpretation is not meaningful. For this reason, you should enter Drug as a factor/categorical variable with one category excluded as the reference category.

The model without interactions that should be fitted is: $y=b_0 + b_1Age + b_2Weight + b_3Calcium + b_4Vit1 + b_5Drug10 + b_6Drug20+\epsilon$

While the model with interactions that should be fitted is (assuming Drug=0 is the control group for the dosages): $y=b_0 + b_1Age + b_2Weight + b_3Calcium + b_4Vit1 + b_5Drug10 + b_6Drug20+b_7(Age \cdot Drug10)+b_8(Age \cdot Drug20)+b_9 (Weight \cdot Drug10)+b_{10}(Weight \cdot Drug20)+b_{11}(Calcium \cdot Drug10)+b_{12}(Calcium \cdot Drug20) + b_{13}(Vit1\cdot Drug10)+b_{14}(Vit1\cdot Drug20)+\epsilon$

Whether you include interaction terms in the model really depends on your research question. If you suspect that the effects of Age, Weight, Calcium, and Vit1 differs by Drug dose category ("is modified by Drug dose category"), then you should fit the model with the interaction terms. Note that you do not have to interact all of your model covariates with the drug dosages. You can interact some, all, or none, again depending on the research question you are trying to answer.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.