I was having trouble finding this exact circumstance; hopefully I haven't missed an obvious previous answer.
I have a target variable,
Y (discrete counts), and two potential regressors,
A (discrete counts) and
B (continuous). There's an obvious, necessary causal relationship
A -> B from the data generating process, and
B is in fact highly correlated with
R ~= .95)
My aim in the analysis is to determine whether
B is a significant factor in addition to
A, so the collinearity is problematic. My first pass (feel free to suggest principled alternatives if this seems kafka; not a stats wiz yet) is to fit a negative binomial regression essentially as
Y ~ A + B, and determine whether the value fit to
B has a significant value.
However, the collinearity makes the regression suspect if the ordinal variable
A is treated as a continuous variable. In this circumstance, is it acceptable and useful to treat
A as a categorical variable using dummy encoding?
At a glance, this seems to ensure
B can't be collinear with any level of
A. But that seems suspiciously like a free lunch to me - am I missing something that may be problematic here?
(I am aware of dummy trap, but unless I'm mistaken, that seems like a separate and easily avoided encoding issue...)