# Logistic vs. OLS

So the title is a bit misleading.

I have a categorical dependent variable (no, maybe, yes) in multiple observations over a span of several years that I have turned into "percentage that said 'yes'" So technically it is now "yes" vs. "no and maybe" and bounded by 0 (0%) and 1 (100%). I am using OLS because I am interested in the one unit increase association between my independent (another percent) variable and my dependent variable. None of the coefficients of my independent variable would result in my dependent variable crossing 0 (0%) and 1 (100%). Additionally, besides the loss of interpret-ability, I don't want to use logistic regression because the "prevalence" of my independent variable is very high (>65% in most cases), so the resulting OR from a logistic regression would be inflated. What do you all say? How would you explain the use of OLS in this case if someone was very adamant that I have a dichotomous outcome variable?

-
The logistic link function does not require you to have any particular concentration of outcomes. If your data are not the result of a random sample (say, a case-control design), then your intercept is simply fixed at the ratio of positive to negatives (but is still the ML estimate). Likewise, your coefficients are ML estimates given the data. – General Abrial Apr 28 '14 at 23:39

You would not validly explain the use of OLS:

1. If you interpret the OLS outcome as probability of outcome = 1, then your model says that it is possible for P$(Y=1) > 1$, and for P$(Y=1) < 0$, which is problematic.

2. Your errors are not distributed $\mathcal{N}(0,\sigma)$, thus violating a fundamental OLS assumption.

3. Although you write "None of the coefficients of my independent variable would result in my dependent variable crossing 0 (0%) and 1 (100%)." This seems patently false, although unintended I am sure, for any value of $\beta \ne 0$: your model must cross both $Y=0$ and cross $Y=1$ (regression lines are infinite): what is your OLS model's best guess as to the probability of $Y=1$ when your model says the probability is less than or equal to zero? (And vice versa?)

You write "I am using OLS because I am interested in the one unit increase association between my independent (another percent) variable and my dependent variable." You seem unaware that logistic regression is interpretable. With logistic regression you can:

1. answer the question "What is the change in $\ln(\text{odds}(Y))$ (the log odds of the probability of my dependent variable equals 1) given a 1-unit increase in my independent variable," or, if your prefer to talk about relative probability, rather than log odds, you can
2. interpret $e^{\beta}$ as the answer to the question "What is the change in odds$(Y)$ given a 1-unit increase in my independent variable."

As user777 has noted: you are misinformed about logistic regression and high (or any) prevalence biasing odds ratios.

-
+1, However, I suspect by: "None of the coefficients of my independent variable would result in my dependent variable crossing 0 (0%) and 1 (100%)", the OP means 'w/i the [0, 1] interval of possible X values'. This is, of course, still wrong, but your #3 won't address the way the OP presumably thinks about this issue. – gung Apr 29 '14 at 2:19

I would consider a fractional logit model, which can be implemented as a GLM with binomial family, a logit link, and heteroskedasticity-robust standard errors. This can accommodate 0s and 1s if those occur through the same process as the intermediate proportions. Showing us a kernel density of your outcome may help in deciding whether this is an appropriate route: a big mass point at zero and/or one would call that into question. A zero and/or one inflated beta is something to think about if you want to relax the same DGP assumption.

In econometrics, the standard fractional logit reference is Papke, L.E. and J.W. Wooldridge (1996) "Econometric Methods for Fractional Response Variables With an Application to 401 (K) Plan Participation Rates," Journal of Applied Econometrics. Vol 11, No. 6, pp. 619-632, though this idea was independently rediscovered by them.

Here's an example with Stata where I get the marginal effects. We will model the fraction of students that receive a free lunch (range [0,1]) and how that's related to a test score, having a year-round program at the test school, and average parental education:

. use http://www.ats.ucla.edu/stat/stata/faq/proportion, clear

. glm meals i.yr_rnd parented api99 , link(logit) family(binomial) vce(robust) nolog
note: meals has noninteger values

Generalized linear models                          No. of obs      =      4257
Optimization     : ML                              Residual df     =      4253
Scale parameter =         1
Deviance         =  395.8141242                    (1/df) Deviance =   .093067
Pearson          =  374.7025759                    (1/df) Pearson  =  .0881031

Variance function: V(u) = u*(1-u/1)                [Binomial]
Link function    : g(u) = ln(u/(1-u))              [Logit]

AIC             =  .7220973
Log pseudolikelihood = -1532.984106                BIC             = -35143.61

------------------------------------------------------------------------------
|               Robust
meals |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
yr_rnd |
Yes  |   .0482527   .0321714     1.50   0.134    -.0148021    .1113074
parented |  -.7662598   .0390715   -19.61   0.000    -.8428386   -.6896811
api99 |  -.0073046   .0002156   -33.89   0.000    -.0077271   -.0068821
_cons |   6.801683   .0723775    93.98   0.000     6.659825     6.94354
------------------------------------------------------------------------------

. margins, dydx(parented)

Average marginal effects                          Number of obs   =       4257
Model VCE    : Robust

Expression   : Predicted mean meals, predict()
dy/dx w.r.t. : parented

------------------------------------------------------------------------------
|            Delta-method
|      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
parented |  -.1291434    .006566   -19.67   0.000    -.1420124   -.1162744
------------------------------------------------------------------------------


This means the an additional unit of parental education is associated with a 12 percentage point reduction in the fraction of kids that get free lunch. In this case, there's substantial mass point near 1, but a one-inflated beta gets -11 and robust OLS yields -13. When in doubt, report all estimates. Hopefully the choice of model won't matter too much, and the curmudgeons can have their preferred specifications.

You can also look at the covariate-adjusted fraction for various levels of parented:

. margins, at(parented ==(1(1)5)) noatlegend

Predictive margins                                Number of obs   =       3678
Model VCE    : Robust

Expression   : Predicted mean meals, predict()

------------------------------------------------------------------------------
|            Delta-method
|     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
_at |
1  |   .7417007   .0133895    55.39   0.000     .7154578    .7679436
2  |   .5848824   .0077481    75.49   0.000     .5696964    .6000684
3  |   .4107898   .0028101   146.19   0.000     .4052822    .4162975
4  |   .2548212   .0087656    29.07   0.000      .237641    .2720015
5  |   .1410782   .0103446    13.64   0.000     .1208032    .1613532
------------------------------------------------------------------------------


All else equal, moving from the lowest to the highest level of parental education takes the fraction from 74 to 14%.

For readers unfamiliar with the US education system, we have a government-subsidized program where children from families with incomes at or below 130 percent of the poverty level are eligible for free or discounted meals in public and nonprofit private schools.

-
Thank you guys for the suggestions. Back to the drawing board... – user44625 May 1 '14 at 1:17

As others have said, OLS is inappropriate in this setting. It is also completely inappropriate to discard valuable information at the outset by pooling "no" and "maybe". The original problem is calling for an ordinal response (3-level) model such as the proportional odds logistic model or the log-log link cumulative probability model (discrete proportional hazards model).

To try to achieve interpretability by choosing a wrong model whose every assumption is violated is not a good idea.

-