0
$\begingroup$

I've been using a negative binomial model to compare the number of particles in the ocean of different sizes to their abundance.

My gam, in r code looks like this

gam(TotalParticles ~ log(lb), offset = log(binsize * vol), data = df, family = "nb")

I'm using gam, rather than glm, because the former can handle negative binomial regressions and poisson regressions with the same syntax and I was comparing the two at one point

Essentially I'm interested in the slope of the relationship between the log of size lb and the log of particle number Total Paricles. The particle sizes have been binned by size, and so I normalize to the width of that bin. The particls are also collected in different volumes of water, so I also normalize to that volume vol.

I'm trying to express this in math and words in a corresponding manuscript. Right now, based on this post, I'm writing the equation as:

$$ ln(\frac{E(Total\,Particles)}{Volume *Binsize}) = b_0 + b_1\,ln(Size) $$

My co-authors keep asking me what E means in this context. My understanding is that we are predicting an expected "negative binomial" distribution of total particle numbers from size.

So far I have written:

The term on the left describes the expected volume and bin-size normalized count data, assuming a negative binomial distribution of residuals, with E referring to the conditional expectation of total particle numbers, assuming a negative binomial distribution.

I have two questions:

  1. Does my equation actually correctly represent the linear model written in code? If not, is there a better way of writing it?

  2. Is there a better way I can express in words what is going on on the left hand side of the equation?

$\endgroup$
3
  • $\begingroup$ Related answer in the context of Poisson model, but that idea is identical. $\endgroup$ – Dimitriy V. Masterov May 4 at 20:51
  • $\begingroup$ Thanks. That gives me confidence that the equation that I am using is ok, unless of course NB are written differently than poisson models. That explanation also uses the E term, though I don't fully understand what that means, even from the provided post. $\endgroup$ – ohnoplus May 5 at 1:48
  • 1
    $\begingroup$ The expectations have the same form for NB and Poisson (though the parameters will of course be different). E stands for expected value here, which is a conditional mean. Technically you are modeling the mean of the number of particles given some covariates, not the number of particles itself. $\endgroup$ – Dimitriy V. Masterov May 5 at 1:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.