# continuous independent variable with three levels

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.

• +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. – Mark White Jul 22 '18 at 17:46
• 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. – Galit Jul 22 '18 at 18:10

• 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.