[R] weights vs. offset (negative binomial regression)

유준택 yjt7660 @end|ng |rom gm@||@com
Sat Oct 28 09:30:22 CEST 2023


I have a dataset that includes five variables.

- Catch: the catch number counted in some species (ind.)

- Effort: fishing effort (the number of fishing vessels)

- xx1, xx2, xx3: some environmental factors

As an overdispersion test on the “Catch” variable, I modeled with negative
binomial distribution using a GLM. The “Effort” variable showed a gradually
decreasing trend during the study period. I was able to get the results I
wanted when considered “Effort” function as a weights function in the
negative binomial regression as follows:








edata <- data.frame(Catch, Effort, xx1, xx2, xx3)


qcc.overdispersion.test(edata$Catch, type="poisson")


summary(glm.nb(Catch~xx1+xx2+xx3, weights=Effort, data=edata))

summary(glm.nb(Catch~xx1+xx2+xx3+offset(log(Effort)), data=edata))

I am not sure the application of the weights function to the negative
binomial regression is correct. Also I wonder if there is a better way
doing this. Can anyone help?

	[[alternative HTML version deleted]]

More information about the R-help mailing list