2
$\begingroup$

I am relating age to a binary outcome in a logistic model (or, more to the point I would like to). However, the distribution of the ages looks like this:

nn <- 1000
age <- c(rpois(nn / 3, lambda = 0.5),
       rnorm(nn / 3, mean = 10, sd = 2),
       runif(nn / 3, min = 0, max = 15))
age <- age[which(age > 0)]

alt text

How would you approach this problem?

Thanks!

$\endgroup$
7
$\begingroup$

Logistic (or other) regression does not make any assumptions about the distribution of the predictors, they are only assumed to be known exactly. So there is nothing stopping you from going ahead and using age in your regression model.

The issue you have to actually worry about is whether the effect of age is linear on the logit scale, but that has nothing to do with its distribution.

$\endgroup$
  • $\begingroup$ Thanks! What is a good approach if it's not linear in the logit scale? $\endgroup$ – Andrew Dec 10 '10 at 23:52
  • $\begingroup$ You can try transformations (e.g. using user2040's suggestions), or splines. $\endgroup$ – Aniko Dec 11 '10 at 20:02
2
$\begingroup$

@andrew: I personally like a simple approach which is to create a logit plot where I would do something along the lines of binning age into 10 groups (deciles) and plotting the logit against these bins. This gives a sense for the linearity of the variable in the logit and may suggest a transformation.

$\endgroup$
0
$\begingroup$

If binning the age variable is an option, you might want to use a classification tree to get an idea of where to place the cutoffs.

$\endgroup$

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.