# When to designate fixed effect as factor

I'm using linear mixed effects regression in R. I have a picture naming study with reaction time as the DV. I'm interested in the effect of an item's ordinal position, which is defined by the number of items that have already been named from that semantic category (e.g. Ordinal position 3 is the third item from that semantic category). There are two such fixed effects with this definition (differing based on item novelty). One has 3 levels, the other 4. I've defined them as factors in my lmer model. Doing so gives me different results than when I don't define them as factors. I consider them categorical variables, thus designating them as factors in my model, but with different results for each I'd like to be sure.

In other words, I'm interested in my DV (naming latency) from one ordinal position to the next (0:2 or 0:3, depending on predictor). An item's ordinal position is defined by how many semantically-related words have preceded it in the current cycle.

Edit for requested clarification: the question is whether the predictors described above (ordinal positions) would be appropriately classified as factors, rather than allowing R to treat them as continuous.

• @PeterFlom, it wasn’t clear, at least to me, if the predictors in question are ordinal. In this case, I think it could make sense to check if the ordered categories have a linear relationship (or quadratic or cubic). This is at least what contr.poly() is doing in R for ordered factors. – Dimitris Rizopoulos Sep 7 '18 at 14:10
• @S.Faw when you define a factor as an ordered factor, R uses orthogonal polynomial contrasts. The idea is to see if you can take advantage of the ordering of the categories & spend less parameters than if you treat it as an ordinary factor. By default you for $K$ levels you get a $K-1$ polynomial that provides the same fit as treating as an ordinary factor. But looking at the coefficients, you can for example see that only the linear coefficient is significant and the remaining not. Then the you can re-fit the model assuming a linear relationship and spend only one parameter. – Dimitris Rizopoulos Sep 8 '18 at 8:25