I have a model with a variable named "Delay" as a predictor (measured in seconds). It sounds reasonable to treat it as a continuous variable. However, I have two thoughts regarding this:

  1. I sampled only three levels of Delay (assuming "levels" is the right terminology in this case): 0, 3 and 6. Is there any reason to believe it is better to think of it as a categorical variable? I saw there was also an option in R to define a variable as ordinal (ordered(Delay)). I found that the results of my regression analysis were different for each of the three options (continuous, categorical, ordinal). What is best and why?
  2. Assuming I expect a decrease in the effect between Delay=0 and Delay=3, but a milder decrease between Delay=3 and Delay=6 - does that change the answer in 1?

Thank you.

  • $\begingroup$ +1 interesting. Can you explain more about the data generation procedure for Delay itself? Does everyone have a Delay from 0 to 6 seconds, but you only took measurements at 0, 3, and 6? Moreover, models don't really have any assumptions on the distribution of the independent variable, so it seems like your three different results (continuous, categorical, ordinal) are because you are imposing different structures on the relationships. For continuous, it is linear (no milder decrease is possible), and I'm not sure how structure between ordinal and categorical is different. $\endgroup$ – Mark White Jul 22 '18 at 17:46
  • $\begingroup$ Hi Mark, it's a behavioral experiment in which I measure response times to a particular task, and I manipulate the appearance of the task relative to the instructions. I originally built it with only three options of delay, not thinking of the analysis later (mostly because it is an expansion of a similar experiment with a delay/no-delay binary option, so I just added a level there). I understand what you say about continuous being linear. However, I though that it is better because the interaction with other factors makes more sense. I don't understand what defining it as "ordinal" does. $\endgroup$ – Galit Jul 22 '18 at 18:10

There is no definitive best option and your final choice should depend on the goal of your analysis. From what I know, the interpretation of your model's output will differ as follows:

  • Delay entered as a continuous variable: The model's intercept represents the value of the outcome for a delay of 0 and the $\beta_i$ of the delay variable represents a the change in the outcome associated with a one unit change in delay. This is the most parsimonious option as only one parameter for the effect of delay is estimated and could make sense if a one unit change in delay is meaningful and a linear trend is of interest for your research question.
  • Delay entered as a factor: The model's intercept represents the value of the outcome for the chosen reference level of delay and the k-1 $\beta_i$ represent the difference between the reference level and the level of delay associated with $\beta_i$. This option estimates k-1 parameters to quantify the effect of delay and could make sense if you are interested in comparing the effects of different levels of delay, as several options for post-hoc comparisons are available.
  • Delay entered as an ordinal factor: The model's intercept represents the value of the outcome at the mean factor level and the k-1 $\beta_i$ correspond to polynomial contrasts. For $k-1 = 2$, as in your case, this would be equivalent to a linear and a quadratic trend across the factor levels. See also the answer to this question. Again, k-1 parameters are estimated. This might make sense if you are interested in quantifying and differentiating between linear and non-linear trends.

From what you have written in your question and comments, I'd guess coding delay as a factor might make sense, but again this has to be decided considering the goal of your analysis and your research question. Given a possible weaker trend between a delay of 3 and a delay of 6, I'd be cautious with coding delay as numeric since only a linear trend will be modelled.

| cite | improve this answer | |
  • $\begingroup$ Thanks! I will read a bit about ordered factors, I was not aware that this means that higher order trends are modeled. This might actually be useful if I don't expect necessarily a linear trend. $\endgroup$ – Galit Jul 23 '18 at 7:04

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.