Announcement

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

  • logistic regression with multigroup nominal and ordinal independent variables

    Hi Stata experts

    I am doing multiple regression i Stata followed by logistic regression. My dep.var is binary. Among my variables are both ordinal and nominal variables (called O and N). When the results of the logistic regression is showed it looks something like

    Code:
    mi estimate,or: logit dep.var i.O i.N
    ordinal variable subgroup (O)
    - 2 _____OR 0.5
    - 3 _____OR 0.3
    - 4 _____OR 0.3

    nominal variable subgroup (N)
    - 2 _____OR 1.2
    - 3 _____OR 1.7

    Is it correct to interpret this OR as beeing between group 2 and 1 and between 3 and 1 (and 4 and 1) for each variable?
    What if I would like the result between group 3 and 2 (4 and 2 ect. )displayed for each variable? Can that be done

    Best regards
    Magnus

    Last edited by Magnus Ploug; 12 Jun 2020, 02:50.

  • #2
    Magnus,

    Your interpretation is correct. Stata chooses the lowest coded value as the reference category by default. You can alter that:

    Code:
    mi estimate,or: logit dep.var ib2.O ib2.N
    Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

    When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

    Comment


    • #3
      Thank you very much! That works perfect for my needs.

      I will try to use the functions better next time.

      However when trying the dataex I get the error code
      Code:
      logit jernstatus i.Gender ib3.ASA
      . dataex
      input statement exceeds linesize limit. Try specifying fewer variables
      But I will try to work it out for my next posting
      Thanks again!

      Magnus

      Comment

      Working...
      X