Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Converting ordinal variable

    Dear researchers,

    I have an unbalanced data set. The dependent variable is a categorical variable from 1 - 5. The option of analysis here that I should use is ordered logistic regression -xtologit-.
    But is there any option do you recommend to convert the ordinal dependent variable to scale or ratio, so I can use xtreg. Do you think it is an acceptable method?

    I mean can I treat it as quantitative and linear and use OLS?
    Many thanks in advance.
    Last edited by Ibraheem Khalid; 28 Mar 2021, 09:22.

  • #2
    Okay, following the previous post, I just found a paper by Richard Williams, https://journals.sagepub.com/doi/pdf...867X0600600104

    And, I have found something called Generalized ordered logit by using -gologit2-, and now I am confused on which method I should use? The ordered logistic or the generalised logistic regression, or the linear model and applying OLS?

    I have used the xtologit and I got no output for the Wald chi2 and its probability.
    Then I have used the gologit2, I have got results for the first 4 categories of the dependent variable but for the last category, I have got an error message r(430) which state that convergence not achieved.

    I don't know what I should do, could you please advise?

    I will be so grateful for your answers?

    Comment


    • #3
      There are many types of categorical variables.

      Are your categories 1-5 ordered in some sense? Is there a sense in which 5 is higher/larger/better than 1? If the answer is No, say your categories stand for 1 blue bus, 2 green bus, etc., then the appropriate model is the nonexistent xtmlogit, which this post here explains how you can fit by -gsem-
      https://www.stata.com/stata-news/news29-2/xtmlogit/.

      If your categories are ordered, as you said xtologit and xtoprobit become appropriate models.

      If your categories are ordered, you can also do linear regression, but the magnitudes of the coefficients will be meaningless. You still will be able to see whether a predictor has a positive/negative and/or significant/insignificant effect on the outcome.

      Finally linear regression is completely appropriate if there is a sense in which your categories are measurements, and say 2 is exactly one unit above 1, and 3 is exactly 2 units above 1, etc.

      Comment


      • #4
        Originally posted by Ibraheem Khalid View Post
        I have used the xtologit and I got no output for the Wald chi2 and its probability.
        Then I have used the gologit2, I have got results for the first 4 categories of the dependent variable but for the last category, I have got an error message r(430) which state that convergence not achieved.

        I don't know what I should do, could you please advise?
        You could try:

        1. Simplifying your regression model (fewer predictors, omitting interaction terms etc.)

        2. Combining adjacent categories of the response, especially those that are relatively sparse overall or at some combinations of predictors

        3. Fit a marginal model using -ologit . . ., vce(cluster <grouping variable>)-

        4. Specifying starting values (I think that -xtologit- uses those from -ologit- and so it's probably not worthwhile using what you get from #3 as starting values)

        5. Some mix-and-match combination of the above

        Comment


        • #5
          You first need to run ologit model. Then, regardless of what you get, you need to run oparallel command. If you do not have it, type ssc install oparallel. This is called "parallel regression assumption". It basically says that whether the differences between categories are identical. As a result of oparallel command, there are two options: 1) If the results results are INSIGNIFICANT where p values are greater than 0.05, then you need to continue with regular logit model 2) if you have SIGNIFICANT reseults where p values are less than 0.05, then it means you need to go for generalized ordered logit model with gologit2. Then, you need to run "mfx" command to have marginal effects.

          I hope it helps.

          Comment


          • #6
            Thanks very much for all of your answers. Greatly appreciated.

            Comment

            Working...
            X