1
$\begingroup$

I am training a logistic regression model on some continuous numeric data with binary labels, and I have access to an auxiliary variable (discrete, numeric). This auxiliary variable represents the ordinal position of an item on a web page. Each item has an 𝑜𝑟𝑑𝑖𝑛𝑎𝑙𝑃𝑜𝑠𝑖𝑡𝑖𝑜𝑛∈ℤ+ denoting it was either the first item, second from the top, third from the top, and so on.

This auxiliary variable is NOT available in our production environment, but I would still like to train the model in such a way that the ordinal position does not bias our results (i.e., normalize by ordinal position). How might this be done?

I have thought about aggregating records by 𝑜𝑟𝑑𝑖𝑛𝑎𝑙𝑃𝑜𝑠𝑖𝑡𝑖𝑜𝑛, finding the average score by group, finding the grand-mean, deleting records in above-grand-mean groups (to lower group's mean to grand-mean), and artificially adding records to below-grand-mean groups (to raise group's mean to grand-mean). However, I am concerned this will skew the results.

$\endgroup$
  • 1
    $\begingroup$ The only way to assure that ordinal position does not affect the model is to omit from the model. Omission does not prevent ordinal position from affecting your outcome, but the model will will not be adjusted for OP if omitted. The effect will end up in the model error and, if truly associated with your outcome, would be better off in the model adjusting the effect of other covariates. $\endgroup$ – Todd D Nov 13 '19 at 15:42
1
$\begingroup$

Let $Y$ be the binary outcome, OP the ordinal position and $x$ the other predictors. Then build a logistic regression model for $Y$ using both $x$ and OP, maybe representing OP via a spline.

Then when you want to make predictions without knowing OP, make predictions for all possible values of OP and average them over the marginal distribution of OP.

$\endgroup$
  • $\begingroup$ That makes sense. Thank you $\endgroup$ – Tyler Collins Nov 15 '19 at 19:58

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.