1
$\begingroup$

I built a conditional logistic regression model for 'guest booking a hotel from the hotel search results page'. In my initial model, I didn't do any transformations to the independent variables. This model fits fine, and I am exploring ways to see if I can improve the fit. So, later, I tried different transformations (log, normalizing etc.) to the independent variables (distance from search center, rate , reviews, etc.). However, whatever transformations and combination of transformations I try for the independent variables, the model fit is not improving than the initial model (without transformations).

Here is what my data looks like. Instead of using absolute distance or price in below as the independent variable, I am using "distance/(mean distance in the search)". And this transformation is very relevant for the data and assume it should improve the fit atleast slightly. Any help would be greatly appreciated.

Search   Property_id    distance (miles)    price   # of reviews    Booked 
1         abc             0.9                  75      125            0
1         ced             1.5                  67      541            0
1         der             2.3                  68      320            1
1         gft             1.1                  85      84             0
2         bcd             3                    70      64              0
2          bcr            2.3                  105      320            1
2          edr            4.4                  98       154            0
2          gft            7.8                 120       27             0
2          frt            6.2                  80       65             0

I have pretty good data size with some 50K searches in my model data.

$\endgroup$
3
  • 3
    $\begingroup$ (1) What, if any, indication is there of lack of fit in the initial model? (2) No particular transformation is guaranteed to improve fit of course, & if you're trying many transformations wildly in the hope of improving fit, you need to take some measures to avoid overfitting. It'd probably make more sense to use polynomial or spline bases for predictors from the outset. (3) There are so few details in your question that you can't expect more than vague generalities in any answer. $\endgroup$
    – Scortchi
    Commented Mar 30, 2017 at 19:00
  • $\begingroup$ Thank you @Scortchi . I don't see any lack of fit specifically. I validated the model on a test dataset and results seem to be okay. I am checking on how to improve the performance and if transformations can be helpful. $\endgroup$
    – tjt
    Commented Mar 30, 2017 at 20:33
  • $\begingroup$ @Scortchi, I wrongly assumed that transformations should improve the fit. but however, even some relevant transformations (like dividing the distance of a property by the mean distance of all properties in result set) , didn't help. $\endgroup$
    – tjt
    Commented Mar 30, 2017 at 20:41

1 Answer 1

0
$\begingroup$

It would be helpful to see more data to be clearer on why this is occuring.

With that being said, here is my take on the problems you describe:

1) Have you already checked with a QQ-Plot (if you are using R, input: qqnorm(variable); qqline(variable) the distribution of your model? You need to make sure that the distribution (or the one you transform it to) makes theoretical sense, and you are not just doing so by a trial and error process.

2) A logistic regression, by its very nature, has much less variation in the dependent variable than an OLS regression, since the dependent variable is not interval. In this regard, higher numbers of observations are preferable when running a logistic regression (500 or greater according to Studenmund et. al). Does your dataset have sufficient observations to explain the variation in the dependent variable?

You should think carefully about the above two factors, along with reevaluating whether your independent variables make theoretical sense in the first instance, before attempting to transform data in this manner.

$\endgroup$
4
  • 1
    $\begingroup$ What exactly are you checking the distribution of, & why, in (1)? $\endgroup$
    – Scortchi
    Commented Mar 30, 2017 at 19:03
  • $\begingroup$ @Scortchi The distribution of the independent variables in the study. e.g. if the OP is trying to normalise a variable that already follows a normal distribution, then clearly the results will be inaccurate. Therefore, one needs to know the distribution of the variable before attempting to modify the same. $\endgroup$ Commented Mar 30, 2017 at 19:07
  • 2
    $\begingroup$ But a logistic regression does not care about the distribution of the independent variables, there is no model fit reason to transform one to normality, or anything else. What is important in the conditional distribution of $Y \mid X$. $\endgroup$ Commented Mar 30, 2017 at 19:39
  • $\begingroup$ Thank you Matthew, I misunderstood the question somewhat. To your point, since a logistic regression is not looking at distribution of independent variables as a factor - as you stated, transforming variables in order to improve fit is likely not the best way to go about this. $\endgroup$ Commented Mar 30, 2017 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.