I want to model the probability of a binary variable x given some predictor, d. It needs two parameters:

  • One parameter that sets the "break point", at which p(x=1 | d) = 0.5.
  • One parameter that sets the "softness", i.e. how abruptly the probability changes around the break point.

(Sorry I'm sure there's standard terminology for this, but I'm a bit of a novice.)

A logistic regression model feels like the right approach, but the domain of d is [0, inf] (d is a distance metric). Is there a standard way to transform d to [-inf, inf] so a logistic regression can be used (e.g. f(x) = x-1/x)? Or is there another common model for this kind of scenario?

  • 1
    $\begingroup$ Is d a parameter of the logistic regression or a predictor used in logistic regression? It sounds like a predictor but you call it a parameter. If it is a predictor, then its domain is irrelevant. $\endgroup$ – Rob Hyndman Nov 10 '10 at 2:27
  • $\begingroup$ d is the predictor. Thanks for correcting me, I've updated the question. $\endgroup$ – redmoskito Nov 10 '10 at 2:29

Logistic regression satisfies your requirements -- two parameters controlling the mid-point and the rate of change. But there is no restriction on the domain of predictors. You can just fit a logistic regression using d as it is.

However, if d is highly skewed (as it might be with that domain), then taking a log of d may be useful to prevent the fit being dominated by a few observations.

If d includes exact zeros, then you obviously can't take logs. In that case, if you still think you need a transformation, then I'd use an inverse hyperbolic sine transformation.

  • $\begingroup$ BTW, I just took the log of d. d can include zeros, but the logistic function maps that to zero, which is what I wanted. $\endgroup$ – redmoskito Nov 10 '10 at 13:30

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.