2
$\begingroup$

I am modeling data that are proportions between 0 and 1, with many values of 0 and 1 in the data set. I'd like to model this as a truncated normal between 0-1, using a logit link in glm for R. I have two questions:

  1. Is a truncated normal with logit link via glm appropriate for proportion data with many real 0 and 1s?

  2. How would I go about specifying a truncated normal family within glm for R?

Note: Beta regression is not appropriate, as it does not like 0s or 1s.

$\endgroup$
6
  • $\begingroup$ Are these actually proportions? As in do you have an integer numerator and denominator? If so have you consider using the logit link on the odds, i.e. binomial logistic regression? $\endgroup$ Commented Mar 2, 2016 at 20:08
  • $\begingroup$ For the data set you describe any model involving a normal distribution seems like a poor choice. Some alternative ideas might be beta regression with point masses at zero and one or quasi-likelihood. $\endgroup$
    – dsaxton
    Commented Mar 2, 2016 at 20:10
  • $\begingroup$ @DaltonHance they do have integer numeric, positive numerators and denominators, and are indeed proportions. Will binomial logistic work, considering that the binomial family assumes all inputs are 0's and 1's, with nothing in between? $\endgroup$
    – colin
    Commented Mar 2, 2016 at 20:12
  • $\begingroup$ @dsaxton beta regression is challenging, because it assigns very low probability to values of 0 or 1, however these are extremely common proportions in my data set. $\endgroup$
    – colin
    Commented Mar 2, 2016 at 20:13
  • 1
    $\begingroup$ A conditional response that is truncated normal would be worthless for modeling lots of zeros and ones. I suspect you might be thinking of censored data. Just knowing the correct term in this case ought to point you in a good direction. For instance, you could start researching methods of censored regression. $\endgroup$
    – whuber
    Commented Mar 2, 2016 at 20:37

1 Answer 1

2
$\begingroup$

Given that these are data are proportion of two integers, it makes much more sense to use binomial logistic regression on these data. Logistic regression is not just for the Bernoulli distribution (binary 0/1).

The advantage of this approach is especially apparent if you have different denominators in that the proportion 20/100 has much more information about the binomial parameter $p$ than the proportion 2/10, even though both have the same decimal proportion. Binomial is also the natural family for integer valued proportions. In R this is accomplished by providing your response variable as the binned odds. Here x is the numerator and y is the denominator of each proportion:

x = c(3, 12, 6, 8, 10)
y = c(6, 17, 14, 20, 23)
bin = cbind(x, y-x)
glm(bin ~ NULL, family =  "binomial")

However, there is one additional consideration for using the binomial distribution in logistic regression. For the binomial family, the variance is related to the mean through the binomial probability parameter, $p$. It is possible, even common, that your residuals will demonstrate more variation than expected from the binomial distribution. (Not something you have to worry about with binary inputs to logistic regression). This overdispersion can be due to not having enough covariate information to explain the data (e.g. there are missing predictors) or simply because nature doesn't like the to follow the rules. The consequence of not accounting for overdispersion is that your standard errors will be too small. You can accommodate this overdispersion in your model by using quasi-likelihood and choosing the "quasibinomial" family in glm. Eg:

glm(bin ~ NULL, family =  "quasibinomial")

We can check for overdispersion by running the summary function on the above model. If we do that, we'll see a line that says:

(Dispersion parameter for quasibinomial family taken to be 1.078017)

That's pretty close to 1 for our made up data, so here we would choose to use the family ="binomial" and not worry about overdispersion.

$\endgroup$
3
  • $\begingroup$ thanks for the response, going to try this approach. To make sure I'm clear here: this has no problem with lots of proportions of 0 or 1? $\endgroup$
    – colin
    Commented Mar 2, 2016 at 20:42
  • $\begingroup$ Not sure I know what you mean by a problem. The model will run and will fit a line to the log odds. Whether it is a good model depends on your data and how well your hypothesized model matches reality. I highly recommend you start with a quasibinomial model, though. $\endgroup$ Commented Mar 2, 2016 at 20:50
  • $\begingroup$ This is throwing an error: Error: no valid set of coefficients has been found: please supply starting values. Seems to be the zero and 1 values that drives this. $\endgroup$
    – colin
    Commented Jun 14, 2016 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.