Announcement

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

  • Reverse Coding a Count Variable

    Hi All, I hope you are doing great. I have a question about reverse coding a count variable. I have a number of customer complaints as a dependent variable. I want to reverse code this variable. It is common to reverse code a survey/scale item. Is it okay to reverse code a count variable? I would appreciate your response. Thank you.

    Moeen

  • #2
    Not sure I follow, but for example if 3 answers out of 10 are wrong, then 7 out of 10 are right and reversing so that you have a new variable

    Code:
    gen wrong = 10 - right 
    maps one count to another.

    In this circumstance, it is possible that you have a proportion (bounded outcome) in disguise and working with wrong/10 or right/10 and logit or probit link is often indicated.

    If your variable is only used as a predictor, the change is more trivial.

    If that doesn't answer your question, please give more detail.

    Comment


    • #3
      Thanks so much, Nick. I have a dependent variable as "number of customer complaints against a restaurant". My data shows that the number of complaints varies from 0 to 46 for different restaurants. I use this variable as an indicator of restaurant quality. So, the fewer the number of complaints, the greater will be the restaurant quality. To make things easier for readers, I want to reverse code the number of complaints variable. I would appreciate your guidance on how to reverse code this variable. Thanks.

      Moeen

      Comment


      • #4
        I wouldn't reverse this because there is no way to do that without causing serious extra problems of interpretation. For example 46 MINUS complaints is going to be hard to model sensibly. No model will know that 46 is a special number and you're likely to get very weird results. Also, 47 or 48 or ... is presumably also possible, which compounds the problem.

        A better answer might follow if you make clear whether this variable is an outcome or response (dependent variable, in terminology that refuses to die) and what modelling you intend

        Comment


        • #5
          Hi Nick, This is an outcome variable. I am running zinb in Stata. I also have the same concerns raised by you and would avoid reverse coding it. Please let me know what you think. I need to respond to a reviewer and your input means a lot. Thanks so much.

          Moeen

          Comment


          • #6
            Originally posted by Moeen Butt View Post
            I need to respond to a reviewer
            Someone asked to reverse code a count? Perhaps you misunderstood the referee's request.

            It would make more sense to ask you to include an exposure variable in the ZINB model—bookings, total customer reviews or scorings (on some Internet ratings site), gross sales (or some other contemporaneous surrogate or actual measure of total patrons) for use as an index of the exposure for the count of complaints made against each restaurant.

            Comment


            • #7
              So, what is the reviewer suggesting? If zero inflation is present, you presumably need to model that directly. There isn't a procedure I know of for 46-inflated counts.

              If the objection is that complaints don't measure quality, but its lack, well yes. There are plenty of performance measures that run that way where higher is usually worse: unemployment rate, deaths from COVID, number of bugs or time to run in a program.

              The only other idea I can suggest is a generalized linear model with reciprocal link function but I doubt that would work better -- just a wild guess.

              Comment


              • #8
                Thanks so much, Nick. The reviewer only checked the possibility of transforming this variable so that there is a positive relationship between complaints and quality. Right now, my measure has an inverse relationship with the quality. In light of your input, I think I can now convince the reviewer that the transformation (I guess reverse coding) is not recommended for my variable. Thanks so much, Nick.

                Comment


                • #9
                  Originally posted by Moeen Butt View Post
                  The reviewer only checked the possibility of transforming this variable so that there is a positive relationship between complaints and quality. Right now, my measure has an inverse relationship with the quality.
                  Maybe the referee was just asking you to flip the signs of the regression coefficients, not messing with the outcome variable.

                  Comment


                  • #10
                    Why not recode the predictors of the number of complaints? If you have a rating of quality, it would become a rating of bad quality (however, I can't think of antonyms for the noun "quality").

                    Comment

                    Working...
                    X