 # Dependent Variable between 0 and1

Hello everybody
I have a dependent variable (Gini coefficient) with values between 0 and 1 (e.g. 0.657, 0.546, 0.872 etc.) Do you know what kind of regression I should choose? At first I thought Logit, but I think with logit the variable takes the value 0 or 1 (i.e. only 2 values).

Thank you very much for your help.

Start with linear regression, since your outcome is continuous. If it could only be 1 or 0, that is a binary outcome, you'd want to do logistic.

I've a suggestion, but I'm not sure whether this is justifiable or not. I hope @technocrat or someone else on this community will explain that.

Suppose you have y as the Ginni coefficient values (in between and 1) and some predictors x_1, x_2, ..., x_p.

I say, model a linear regression of logit(y) on all the predictors, i.e. fit the model:

log(\frac{y}{1-y})=\alpha_0+\sum\limits_{j=1}^p\beta_j x_j

Then predict using this model, and suppose you have z_0 as the prediction for x_0 from this model. Reverse the transformation to get the predicted y value, i.e. predict the Ginni coefficient for x_0 as Y_0=\frac{e^{z_0}}{1+e^{z_0}}.

Can it be done?

1 Like

Gini, y, is subject to the constraint 0 <= y <= 1, so the LHE evaluates to Inf for y = 1 and to -Inf for y = 0, a problem we don't have without log. I did run across the ineq package which will calculate Gini from vectors and, more importantly, provide Lorenz curves that might help select coefficients for a model. I really didn't run across much in terms of predicting Gini, rather than measuring it, although it does have a role as a diagnostic parameter in several types of models.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.