Announcement

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

  • negative binomial and non-integer values

    Hello,
    is it possible to use a negative binomial with non-integer values?
    My dep var is the number of firm in the technnology sector in each municipalities. So I have lots of zero. However I divided the depvar by the population to account for te size of municipality.
    If this is not possible, should I use just the raw number of firm in the depvar and add the pop as an indep var? or also add he pop as an offset(pop)?
    Thanks
    Giorgio

  • #2
    Yes, you can use -nbreg- with dependent variables with non-integer values. The same is true of -poisson-, and this is frequently a nice way to model dependent variables with right skew distributions.

    However I divided the depvar by the population to account for te size of municipality.
    If this is not possible, should I use just the raw number of firm in the depvar and add the pop as an indep var? or also add he pop as an offset(pop)?
    Dividing the depvar by the population is not the best way to go here. Neither is using the population as an independent variable. And adding pop as -offset(pop)- is close, but not quite right either. The appropriate solution is to specify the -exposure(pop)- option in the command. Or, entirely equivalent, create a ln(pop) variable and specify that in the -offset()- option. But unless you have some other need for the ln(pop) variable, it is more convenient to do it as -exposure(pop)-.

    Comment


    • #3
      Thanks a lot Clyde.
      I forgot to mention that I have panel data, so I will use xtnbreg, with the re option, as I'm interested in the between variability
      I would also like to compare it with alternative estimation methods, such as zero inflated negative binomial. However, I came across previous thread, although very dated, that for the zinb there is no such command in panel data.
      Can you suggest how to do that?
      Thanks
      Giorgio

      Comment


      • #4
        There is no StataCorp command for zero-inflated negative binomial regression in panel data, nor am I aware of any user-written command for that.

        Comment


        • #5
          I see. Thanks a lot Clyde.
          Sorry If I'm getting back to the previous #2.
          What if I neglect the exposure solution and use the non-integer depvar straight away. You says it is not the best way, which means it is wrong?
          Thanks

          Comment


          • #6
            What if I neglect the exposure solution and use the non-integer depvar straight away.
            Well, in that case you are not accounting for the size of the municipality. Whether that is important or not depends specifically on your research question and the meanings of the dependent variable. It is not a statistical or Stata question. For advice on that, you need to ask someone with expertise in your field to learn whether it is OK to model your dependent variable without accounting for the size of the municipality. I do not know enough about the forces that act on creation and destruction of tech firms to know whether municipality size is important or not. My naive intuition is that it is, but I wouldn't rely on that.

            Comment


            • #7
              Many thanks Clyde.
              very helpful.
              I also came across another similar useful old post on this topic
              https://www.statalist.org/forums/for...-p-or-offset-p
              Giorgio

              Comment


              • #8
                It's long since a standard point that some of these models can be applied even if the data aren't integer counts. But watch out: if an outcome has measurement units and dimensions, then the variance-mean ratio does too, and is thus dependent on a choice of units.

                How about considering e.g. a generalized linear model with some other family, say a gamma?

                Comment

                Working...
                X