0
$\begingroup$

I have a survey data which has one dependent variable ("Overall experience") and several independent variables(Quality of food, creativity of menu etc.). The response scorecard for both dependent and independent variables are as follows:

Excellent 5 Very Good 4 Good 3 Fair 2 Poor 1

As per my understanding and from what I have read, I cannot run a simple linear regression and thus I have opted for logistic regression. Can anyone guide me in the right direction regarding logistic regression using R.

$\endgroup$
2
$\begingroup$

Logistic regression would be a fine start. The basic function to do binary logistic regression in R is glm. See here for how to use it.

If performance seems unacceptably poor you can fit a logistic regression using functions of the original features in order to create a more flexible decision boundary (e.g. glm(formula = y ~ x + I(x^2), ...)). Make sure to evaluate performance on either a holdout set or via cross-validation so as to prevent overfitting if you take this route.

If you are not comfortable making this a binary response then you could try ordinal logistic regression. I believe that the ordinal package in R would be helpful.

As a final note, it is not impossible to use OLS linear regression to predict ordinal variables although other things like logistic regression will probably work far better.

$\endgroup$
  • 1
    $\begingroup$ There's also the polr() function, in the MASS package. $\endgroup$ – Jeremy Miles Aug 1 '14 at 17:01
1
$\begingroup$

In the social sciences and market research, linear regression is used for this exact problem / scale all the time. There are problems associated with linear regression, but it works quite well on such data.

As I understand logistic regression, you would have to divide your dependent variable into a dichotome 0/1 variable. Which is problematic for your scale because code 3 could be either category.

$\endgroup$
  • $\begingroup$ You can use ordinal logistic regression instead of dichotomizing the scale. $\endgroup$ – shadowtalker Aug 1 '14 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.