# Regression for an outcome (ratio) between 0 and 1

I am thinking of building a model predicting a ratio a/b, where a <= b, a > 0, b > 0. So, the ratio would be between 0 and 1. For independent variables, I have a continuous one and several 0/1 indicators.

I could use a linear regression, although it doesn't naturally limit to 0..1. I have no reason to believe the relationship is linear, but of course it is often used anyway, as a simple first model.

I could use a logistic regression, although it is normally used to predict the probability of a two-state outcome, not to predict a continuous value from the range 0..1.

Knowing nothing more, would you use linear regression, logistic regression, or hidden option c?

-
Have you considered beta regression? –  Peter Flom May 23 '12 at 22:45
Many thanks to all who answered. I will have to study up and choose. Sounds like a beta is a decent place to start, especially if I can observe a good fit (perhaps by eye). –  dfrankow May 24 '12 at 3:47

You should choose "hidden option c", where c is beta regression. This is a form of the generalized linear model in which the response variable is distributed as Beta. It's exactly what you are looking for. There is a package in R called betareg which deals with this. I don't know if you use R, but even if you don't you could read the 'vignettes' anyway, they will give you general information about the topic in addition to how to implement it in R (which you wouldn't need in that case).

-
Would you mind elaborating on why beta regressions would be preferable in this case? That's a recommendation I see fairly often here, but I don't really see anyone elaborating on the rationale - that would be nice to have! –  Matt Parker May 23 '12 at 23:02
(Though I'm finding the intro to the betareg vignette quite informative) –  Matt Parker May 23 '12 at 23:04
@MattParker, Beta is the distribution of continuous proportions--if that's what you have as your response variable, then Beta is the appropriate distribution to use. It's really that simple. The fitted value from a logistic regression is a probability (which is obviously continuous), but the distribution is binomial (some number of Bernoulli trials w/ success probability $p$) if your response variable is not a set of Bernoulli trials, then LR is not appropriate. –  gung May 23 '12 at 23:21
I would be careful saying that a beta is "the" appropriate distribution to use. It's fairly flexible and it might be appropriate but it doesn't cover all cases. So while it's a good suggestion and may very well be what they want - you can't really say that it's the appropriate distribution solely on the fact that it's a continuous response between 0 and 1. –  Dason May 23 '12 at 23:28
A triangular distribution on [0,1] represents a continuous distribution on proportions that is not a beta. There could be many others. The beta is a nicw flexible family but there is nothing magic about it. You do make a good point about logistic regression because it is usuaLLY applied to binary data. –  Michael Chernick May 24 '12 at 2:07

Not true. The data for logistic regression is binary 0 or 1 but the model predicts p say the probability of success given the predictors $X_i$, $i=1,2,..,p$ where $p$ is the number of predictor variables in the model. Actually because of the logit function the linear model predicts the value of log(p/1-p). So to get the predcition for p you just do the inverse transformation $p=\exp(x)/[1+\exp(x)]$ where $x$ is the predicted logit.

-

Are these paired samples or two independent populations?

If independent populations, you might consider log(M) = log(B) + Xi*log(ratio). M is your measurement (a vector containing all values of A and B) and X is a vector Xi = 1 if Mi is a value of A, Xi = 0 if Mi is a value of B. Your intercept of this regression will be log(B) and your slope will be log(ratio).

See more here:

Beyene J, Moineddin R. Methods for confidence interval estimation of a ratio parameter with application to location quotients. BMC medical research methodology. 2005;5(1):32.

EDIT: I have written an SPSS addon to do just this. I can share it if you're interested.

-
Out of curiosity which method did you use (delta, Fieller or GLM)? It slays me a bit that the BMC article did not do some simulations of the coverage of the different estimators (although to dream up a realistic simulation would be annoying). I was reminded because I recently came across a paper that does the delta method (with no real justification), although it does cite the BMC article. –  Andy W Jun 11 at 19:53
Back when I wrote this comment, I used REGRESSION after log-transforming the data. Since then I've written a more sophisticated version that uses GLM. I deal with light emission measurements and my testing suggested gamma regression with a log-link was the least prone to runaway uncertainty on the parameters. For most of my real data, the answers from using normal, negative-binomial, and gamma with log-link were all really similar (at least to the precision I needed) –  DocBuckets Jun 11 at 21:52