I have a dataset where I'm trying to predict a student's percentage score on a school exam from some other collected IVs. I'm wondering how to correctly run this analysis in R.

A few related questions:

First, I've seen a number of questions on this topic (e.g. What are the issues with using percentage outcome in linear regression?) where the usual recommendation is to use logistic regression. I'm a bit confused about how logistic regression fits into this. I've never formally taken a class on logistic regression, and my understanding (from the machine learning world) is that the evaluation of the linear input through a logistic function is interpreted as the probability that this data point belongs to the majority (1) class. However, I don't have classes per se, so I'm confused about how a logistic model actually works in this case as I essentially have a continuous variable that is bounded by 0 and 100.

I've also seen Poisson regression being recommended in some places. However, that appears to predict integer values, and is likely not a good model for this?

Finally, what are the steps for running this in R? Would I convert my percentage DV to a logit, run the regular lm() function and interpret the coefficients (and their p values) like normal? Is the interpretation of the significance the same as linear regression (i.e. the IV is a significant predictor of the percentage DV when holding all other IVs constant)?


In the comments, it has been suggested that the answer can be found here: How to do logistic regression in R when outcome is fractional (a ratio of two counts)?

The solution there, as proposed by Greg, is to use 2 columns, one specifying a proportion and another to specify the weight (number of total points). This won't work in my case.

In the dataset I only have access to the final percentage/proportion. The data comes from different classes and I have no way of knowing the number of points the individual received on the exam, nor the total number of points available for that exam (as it would likely be different for individuals in different classes)

Option #1 in Greg's post is also not possible because I don't have a binary/categorical response.

  • 3
    $\begingroup$ Look at the comment of @Glen_b in the link you include. That's very helpful. Is your percentage score the ratio of two counts (e.g., number of right answers divided by number of questions in the exam) or is it actually a continuous variable? $\endgroup$
    – DeltaIV
    Commented Feb 14, 2017 at 9:27
  • 1
    $\begingroup$ the % score is a ratio of counts (# of points / total number of points available). However, the data comes from different exams where the total # of points differ, which is why I'm using a percentage instead of a count of points as the DV. Is logistic GLM still used for this? How is it different from logistic regression? And how does one run this in R? $\endgroup$
    – Simon
    Commented Feb 14, 2017 at 16:00
  • 1
    $\begingroup$ I made an edit to my question to address the solution found in that post. I don't think it will work in my case as I only have access to the percentage values, and not the true counts/totals $\endgroup$
    – Simon
    Commented Feb 15, 2017 at 10:03
  • 2
    $\begingroup$ I have to disagree with @amoeba. There is no real problem in applying logistic regression to measured proportions (more generally, doubly bounded outcomes). Not having binary data does not bite. Not knowing original numerator and denominator does not bite. You just need software that doesn't throw you out because your data are not 0 and 1. You will need to scale to proportions, which is trivial. You need to ask for the right kind of standard error. This model has been known since at least 1974. $\endgroup$
    – Nick Cox
    Commented Feb 15, 2017 at 10:51
  • 1
    $\begingroup$ Poisson isn't confined to integers, but it doesn't sound a good idea here. The variance structure there is quite different. Here is a friendly reference: stata-journal.com/sjpdf.html?articlenum=st0147 The 1974 allusion is academic.oup.com/biomet/article/61/3/439/249095/… $\endgroup$
    – Nick Cox
    Commented Feb 15, 2017 at 10:55

1 Answer 1


One of the following three solutions might work for you. However, I am curious what other will suggest:

  1. You can use simple linear regression. However, that procedure might violate some assumptions of linear regression (depends on your actual data). Inferential statistics such as p-values and/or confidence-bands might not be trustworthy. Moreover, your model might predict scores outside of the boundary, which makes interpretations difficult.

  2. You can transform the percentage scores into logits and use them as outcome for the linear regression. Here ist the transformation formula: ln(p/(1-p)) By doing that, you adapt the link-function of logistic regression to the linear regression. That might solve some of the previous problems especially the last one because logits boundaries are -infinite and +infinite. However, you loose interpretability. (Edit: A short discussion of this approach and why it is not recommended can be found in the source linked for the third solution)

  3. Beta-Regression might be the model you are looking for. The following vignette shows how to apply beta regression in R using Cribari-Neto's and Zeileis's "betareg"-Package: ftp://cran.r-project.org/pub/R/web/packages/betareg/vignettes/betareg.pdf

I hope that some of my suggestions might help you!

  • $\begingroup$ Given that OP is talking about ratios of two counts (as clarified in the comments), none of these three options is actually appropriate. The most suitable approach is logistic regression. $\endgroup$
    – amoeba
    Commented Feb 15, 2017 at 9:05
  • 6
    $\begingroup$ #1 has its fans as the linear probability model; I am with those who think it's a bad idea usually. The answer misses out what is usually the best solution in my experience, generalized linear models with logit link, binomial family and robust standard errors. See my comments under the question. $\endgroup$
    – Nick Cox
    Commented Feb 15, 2017 at 11:12
  • $\begingroup$ Update to my comment above: OP has further clarified that the counts themselves are not available, so this excludes "vanilla" logistic regression that I meant above, but one can still use logistic regression with appropriately modified standard errors (aka "quasibinomial" GLM in R), as NickCox wrote. $\endgroup$
    – amoeba
    Commented Feb 15, 2017 at 12:02

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.