I am having a few problems understanding how logistic regression can be used with a dependent variable that is not binary or dichotomous but instead between proportions of 0 and 1. If any of you can enlighten me that would be wonderful. So far the most I can figure out is that if I were to use a linear regression than the values that I would get would make no sense because they would go above 1 or below 0 but what I do not get and cannot find anyone else doing is using logistic regression to predict how many people are evacuating during a given time interval (in this case 1 hour) and if I can do that. Also for my variables I am using continuous, dichotomous, and ordered kinds of data.

Any and all help is appreciated.

Edited to remove the portion of this question I added to another question.

Also just to give you all a bit more information. I am creating a model that would predict the proportion of those who evacuated to the remaining population in an area. For example, 10 percent evacuated/90 percent left and so on over 37 hours. The data is sequential used where each hour before effects the value of each hour after it. In literature they call it the sequential logit model. Currently I am using matlabs generalized linear model function using a binomial distribution linked with a logit.

  • $\begingroup$ If you are looking at a number of people, you may want Poisson or negative binomial regression. But the values you give clearly aren't numbers of people. Perhaps they are proportions of some group? In that case, if you know the numerator and denominator that gave rise to these proportions, you can use logistic with "events/trials" syntax $\endgroup$ – Peter Flom Mar 1 '12 at 0:56
  • 1
    $\begingroup$ Sometimes the target is indeed a proportion or ratio. For example in credit risk area, people are interested in modeling LGD (loss given default) which varies from 0% to 100%. It simply says after customer's default and collection procedure, how much percent of loan amount is finally lost. In this case, is logistic regression an appropriate method. If not what method is better? $\endgroup$ – FMZ Mar 1 '12 at 2:43
  • $\begingroup$ @FMZ: This is potentially an interesting question. I suggest you search for duplicates and, if you don't find one, ask this as a separate question. Cheers. $\endgroup$ – cardinal Mar 1 '12 at 4:23
  • $\begingroup$ Yes, logistic regression is still appropriate; one (approximate) way to think of it is as fitting a logistic-linear curve to the data, downweighting data from where the curve has mean approximately 1/2, and upweighting where it's nearer 0 and 1. Use robust standard errors to give standard errors for your estimates - see e.g. vcovHC in the sandwich package in R. $\endgroup$ – guest Mar 1 '12 at 6:46
  • $\begingroup$ A reasonable and useful method, in this situation, is Beta regression. You can see my answer to stats.stackexchange.com/questions/23921/…. $\endgroup$ – hbaghishani Mar 1 '12 at 8:56

In your case the response variable actually is binary, it has just been summarised into a ratio. Each individual either gets out of the building (1) or doesn't (0). So logistic regression is quite appropriate, you just need to put your data into an appropriate form (which will depend on your software).

In R you do this by making the proportion the response and specifying the population sizes (ie number of trials) as weights.

It sounds like you also have some questions about hypothesis testing and model selection but they might be best put into a separate question, perhaps after you are happy with the logistic regression issue.

  • $\begingroup$ Peter, what if the dependent variable was between 0 and 1 but it didn't come from binary variables? I vaguely remember you wrote something about this recently, but I haven't been able to find it again. $\endgroup$ – mark999 Mar 1 '12 at 9:26
  • $\begingroup$ @tenki I would have though matlab could handle it but I've no idea how you let it know this is what the data represent. $\endgroup$ – Peter Ellis Mar 1 '12 at 18:58
  • 1
    $\begingroup$ @mark999 - I did write something on that recently but deleted it when the question was clarified and turned out that the ratios in question were not proportions. In the event of a response that is between 0 and 1 you could still use a glm with a binomial response but you might get over- or under-dispersion (depending on what has generated the variable). So a quasi likelihood model instead, still with a logit link function, might be more appropriate. $\endgroup$ – Peter Ellis Mar 1 '12 at 19:00

I don't mean to complain, but you have two questions that appear to be closely related where neither of them is clear enough / has enough information to get you a really good answer. You may want to see if you can edit them. @PeterEllis has provided a good answer to the question about why p-values can be high. I don't see what more there is to say about that. He has also provided a good answer here, but maybe I can help.

@PeterEllis is clearly right that your proportions come from some number of successes and some number of failures. If you know those values, you can use them directly as your response variable. However, if you don't know them, you have a problem. You could venture a guess; how effective this would be would depend on how good your guess is. If you had the same number of cases making up each proportion, you could simply convert the proportions directly with the logistic transformation, i.e. ln( proportion/(1-proportion) ) and run a normal ols regression with the transformed data as your response variable. The only issue is that your confidence intervals / p-values would be inaccurate due to the fact that you are counting each proportion as 1 datum rather than the number of data that make up the proportion. Nonetheless, if the same number of cases made up each proportion, then your parameter estimates would be unbiased. In addition, this approach would get you out of the problem of having predicted values outside of the (0,1) range.


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.