3
$\begingroup$

The first variable is 'SMOKE' that indicate if the person is a smoker or not. The second variable 'Daily' is related to the first by an If condition: If the person is a smoker then does he smoke daily or not.

How can I put these two variables in my model?

Thanks in advance,

EDIT: (1)I prefer to exploit the evident ordering from non-smoking to smoker to daily smoker. (If this will be significant in my model)

(2) Smoking is an independant variable in my model (In fact, It's a risk factor for a disease)

$\endgroup$
2
  • 2
    $\begingroup$ Whether any suggested solution is appropriate will depend on two things, which I hope you can clarify in an edit to your question: (1) Do you hope to exploit the evident ordering from non-smoking to smoker to daily smoker? (2) Will this variable be used as an independent variable or dependent (response) variable in the model? $\endgroup$
    – whuber
    Commented Apr 29, 2014 at 15:54
  • $\begingroup$ Thank you, I have edited my question, how can I choose the appropriate method then? $\endgroup$
    – user42987
    Commented Apr 29, 2014 at 16:20

2 Answers 2

3
$\begingroup$

I would simply encode the 'product' of the variables, so instead of:

SMOKER, DAILY

You would then have:

NON-SMOKER, SMOKER-NON-DAILY, SMOKER-DAILY

Ultimately resulting in interaction variables. The advantage is, that you can now also include additional categories such as monthly by adding one variable. Also, you don't lose the semantic of each category and it will be easy to inspect the outcoming models.

As to your edit, if you want to preserve order (which order?), you might want to make a continuous variable with different frequency levels (for instance: daily = 1/1, weekly = 1/7, ..., non-smoker = 0).

$\endgroup$
2
$\begingroup$

Code the variable 'SMOKE' as 0 (for non smoker) and 1 (for smoker). The variable 'Daily' should be coded as 1 for daily smoker and 0 for all other cases. Multiply the two together to get an interaction variable.

$\endgroup$
2
  • $\begingroup$ Please, how can I interpret the interaction between these two variable? Thanks ! $\endgroup$
    – user42987
    Commented May 2, 2014 at 17:12
  • 1
    $\begingroup$ You need both the SMOKE and interaction variables in your model, but not the Daily variable. The parameter associated with the interaction variable is interpreted as the effect of daily smoking (in addition to just smoking). Don't get hung up on the interaction bit, the multiplication is just an implementation of the IF condition you want, (which incidentally is what interactions is) $\endgroup$ Commented May 9, 2014 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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