Announcement

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

  • multinomial logit question

    I am trying to run a multinomial logit as y being the number of credit cards an individual has. I re coded the categories for the original data set for having 1-3 credit cards 4-8 and 9 or more. To create my y variable i
    Code:
    gen cc= credit13 + 2*credit48 + 3*credit9plus
    This is was the cc variable looks like:

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float cc
    0
    1
    1
    3
    1
    3
    1
    1
    2
    2
    1
    1
    2
    1
    0
    1
    0
    1
    1
    2
    2
    2
    1
    2
    1
    0
    I would only want 0 and 1. What command would give me that outcome instead? Thank you!

  • #2
    Well, what do you want the 0 and 1 to correspond to in terms of the original number of credit cards? Probably you will use the -recode- command. Read -help recode-.

    Comment


    • #3
      You can use - keep if - or add the if clause in the regression command.

      If yvar only has 2 categories (0 and 1), a logit model should be used instead of a multinomial logit model.
      Best regards,

      Marcos

      Comment


      • #4
        Thank you for your replies. I am sorry by I worded my question wrong. Based on my command, I feel as through I should only have outcomes 1 2 3, no zeros. I dropped values that equal 0 but that was ~5,000 of my 27,000 observations. I am not sure what 0 would mean in this case.

        Comment


        • #5
          Well, based on your formula, a zero result would correspond to a negative response on all three of the original variables credit13, credit48, and credit9plus. It is hard to e certain what this means without knowing the details of how the data were collected, how the question was posed and what the response options were, and how non-response was handled. But the most obvious interpretation is that those would be people who have no credit cards at all. (But if non-response was handled badly, it could also mean that they just didn't answer the question.)

          Comment


          • #6
            Clyde and Marcos, thank you for your replies I really appreciate it. I had previously dropped respondents who had 0 credit cards, didn't know, or prefer not to say. Very puzzling.

            Comment


            • #7
              Figuring out how someone coded the data you have is really something you have to do yourself – it depends on detailed understanding of how the data were collected and coded. There is no way an external observer looking at the data could tell you what the coder meant by zeros.

              That said, if you have this many zeros, you need to figure out what they mean. Simply dropping them could be a big error.

              Comment

              Working...
              X