# Questions tagged [negative-binomial-distribution]

A discrete, univariate distribution modelling the number of ${\rm Bernoulli}(p)$ trial successes until a specified number of failures occur.

839 questions
Filter by
Sorted by
Tagged with
1 vote
13 views

### Negative Binomial Regression with Moderation Effect

In H1, I predict the positive effect of a program on the consumer spendings. In H3, I want to predict the positive effect of a program on the number of referrals, while also predicting the positive ...
• 11
32 views

### Estimate parameters of an unknown negative binomial distribution based on known distribution

The PDF of a known NBD given in Equation (1). The parameter a and r are function of $μ$ = sample mean, and $s^2$ = sample variance, as given in Equation (2) and (3) respectively. $r$ = number of ...
• 131
31 views

### Which R package can produce such table for the results of a negative binomial models?

I find this presentation of results very handy and I have a suspicion the table presented comes directly from R. Is there a dedicated package for it? This comes from a negative binomial model. Many ...
1 vote
25 views

### Error in wp.logistic: ‘p0’ must be numeric in (0,1)? What to do when p0 is negative?

I am trying to find out the sample size I need for a future study using a reanalysed existing dataset to enter the values in a WebPower script. I am using the intercept and odds ratio/estimate of my ...
17 views

### Can the offset variable be smaller than the outcome variable in a Poisson model?

I am modeling a number of bags of local crop harvested from a village in a given harvest over time. The village is divided into 48 communities and I have data on the total number of bags of crops from ...
1 vote
69 views

### How to interpret an interaction in a negative binomial?

I'm investigating the influence of top management team nationality diversity (TMTdiv, continuous between 0-1) and board nationality diversity (Boarddiv, continuous between 0-1) on firm ...
• 435
1 vote
32 views

### How to deal with bias caused by data collected with different methods on a GLM?

I have two datasets from different years (2020 and 2021) that I needed to merge because my sample was too small. I'm investigating which morphological features (sex, age, weight, fat reserves and ...
• 11
1 vote
22 views

### VST for negative binomial random variable

https://en.wikipedia.org/wiki/Variance-stabilizing_transformation The variance stabilizing transform of a Poisson random variable is the Anscombe transform. What is the VST for a negative binomial ...
• 512
1 vote
36 views

### How to correct for unequal sample size per group in neg. binomial regression

My data contains information on the time, location, and present conditions of a fish catch. The problem we often have in the field is that not all locations can be consistently visited every time. ...
• 691
1 vote
33 views

### How do I determine which count model (quasipoisson, negative binomial, or zero-inflated GLM in R) best fits my count data?

Background: I am modeling counts per square meter of an invasive species, which range from 0 to 380, as part of my master's thesis. The data set has 50 observed zeros out of 161 observations. After ...
16 views

### Visualizing relationships in log-link/exponential distribution models by placing the linear predictor on the Y axis?

I'm visualizing results from a negative binomial regression. I don't want to the graph of Y vs X to look exponential, I want it to look linear. In SPSS, the value provided for the linear predictor is ...
51 views

### What better I use for Negative Binomial Regression with library(MASS) glm(family=negative.binomial) or glm.nb?

Hay, im a newbie and still need more learn. I have several question, I'm trying to create a negative binomial regression model using the R and library(MASS). But i'm still confusing what sould I use ...
23 views

### Negative Binomial: Estimating r (# failures until stopping) when p (success probability) is known

I have a NB(r,p) distribution (let's say with the conventions of the wikipedia page). Suppose I know the success probability p, observe Y the number of successes, but don't know and want to estimate r,...
• 26
1 vote
34 views

### How to develop a negative binomial model where the overdispersion parameter varies as a function of one of the independent variables/covariates?

I am trying to develop a negative binomial model where the dependent variable is crash count, and the independent variables are traffic count and roadway length. Currently, with the below code, I get ...
• 23
25 views

### Should observation level random effects be included when modeling dispersed counts in a negative binomial model?

I am trying to specify a model of counts from very different observation sites. Including site level random effects would definitely make sense since there are aspects that are certainly not covered ...
49 views

### I want to make sure the use of Poisson count model OR negative binomial model is right for my study

I have a planned study to conduct in few weeks. As it is my first time to deal with a 'count' dependent variable, I have been searching on this website what statistics tools I should use. I have two ...
• 1
18 views

### Test for statistical significance between groups in categorical count data with multiple samples

There are two groups/genotypes of mice (WT, KO). For each genotype, four mice were separately used to determine the identities of thousands of individual cells from a particular organ, assigning them ...
• 1
21 views

### Need help obtaining Cov Parameter Estimates in PROC GLIMMIX

I'm really struggling with something that should be a simple solution but for the life of me, I've been struggling for a while now trying to figure it out. I apologize in advance for my lack of ...
78 views

### What should we report in our manuscript for negative binomial regression, IRR or OR?

I have applied negative binomial regression analysis for my data in SPSS. However I am not sure what do I have to report. Is it called IRR and CI or odds ratio (OR) and CI like in logistic regression. ...
1 vote
46 views

### How to deal with zero-inflated data with negative values

Participants in a survey answer two questions similar to this: What is your estimate, how on average a woman performs in this test (from 0 to 100)? What is your estimate, how on average a man ...
147 views

### Negative binomial regression with two fixed effects variables

I'm using the fixest package to fit a negative binomial regression model with two fixed effect variables. The relevant line of code is ...
• 268
69 views

### Can you compare negative binomial models by AIC?

I have a question about comparing negative binomial models by AIC versus QAIC. My dependent variable is a count, and I have one random term (I am using generalised linear mixed models fitted with the ...
28 views

### Calculate probabilities with confidence intervals of integers exceeding certain values from a negative binomial regression model

I'm fairly new to negative binomial regression models, so I hope my question makes sense. So far, I already found this answer to this old question (https://stackoverflow.com/questions/22213315/how-to-...
42 views

### Does a constant offset term meaningfully influence Poisson GLM?

If my offset term is a constant value, does this change the outcome of a Poisson GLM regression? I have survey count data that we summarize as a rate (Counts/Area-Surveyed). In this case, transect ...
• 231
11 views

### Another hurdle models question

Sources of zeros are usually identified as “random zeros” and “structural zeros.” Random zeros may occur from sampling variability. Structural zeros may occur due to sampling at a place where the ...
• 11
13 views

### New distribution when Negative Binomial dispersion parameter is taken to be 1

What distribution do you arrive at if the dispersion parameter is taken to be 1 in Negative Binomial Distribution?
10 views

### Prediction, concordance, ROC curves, and the c-statistic: when is it appropriate to use?

I have a study with 2 variables where one variable should hypothetically predict the other. Var1 is a continuous biological measurement being categorized into a binomial: does the biological ...
• 517
40 views

### Adding count variable IV to Negative Binomial GLM improves fit but causes overestimation

I am currently developing a negative binomial GLM for road safety analysis (known as an “Accident Prediction Model”). Each data point represents a section of road; the dependent variable is the number ...
38 views

### Formula for negative binomial regression

I would like to list the mathematical formula of a negative binomial regression for my paper. Unfortunately I have no real knowledge of statistics or higher mathematics. I would like to use nonlinear ...
14 views

### Minimum sample size to obtain 5 "successes" with high probability using Bayesian estimation and a pilot dataset

I have a population of patients, each with a given type of disease ($D$). The set of disease types is mutually exclusive and exhaustive. Each patient is tested for the same genetic variant, for which ...
• 43
28 views

### Serial correlation test for negative binomial regression with fixed effects

I'm running a binomial negative regression with fixed effects, is there any serial correlation test for this data?... I was thinking in Arellano-Bond (1991) test for serial correlation, but it seems ...
1 vote
31 views

### Distibution of the number of trials required to see all possible outcomes

In the simplest case given a set of N items is the distribution for the number of draws with replacement before all items are seen? This is the case I really need. More generally what is the ...
49 views

### How to solve negative binomial regression? [closed]

I want to estimate negative binomial regression for from scratch i.e. I want to write a script that will maximize maximum likelihood obtaining optimal parameters. To do so we can calculate derivatives ...
• 289
1 vote
126 views

### Interpreting Quadratic Variables in Negative Binomial Regression

I want to include a quadratic term for age in my negative binomial model as past work has suggested it may be curvilinear. I know how to interpret a quadratic coefficient in OLS, but am unsure with ...
• 11
1 vote
69 views

### Interpret interaction coefficients in a negative binomial

Trying to understand count distributions of a fish species over two habitat types (class variable) and three seasons (class variable). The table below shows the results of a hurdle negative binomial ...
• 11
1 vote
65 views

### Negative Binomial Regression or Poisson Regression?

Regarding Generalized Linear Models, at what point do you consider that a Negative Binomial Regression should be used? For example, if the dispersion index is equal to 1.8 (= therefore quite close to ...
• 11
54 views

### Derive closed form interpretation of negative binomial regression linear term coefficient

Consider an experimental setup where any given individual is either exposed or unexposed to some treatment A. Some over-dispersed count variable is measured as the outcome. This can be modelled with a ...
• 23
100 views

### What to do the following fit work using NegativeBinomial in statsmodel?

I am using following code to fit on given data but algorithm could not able to convergence. I believe this is due to high frequency of zero count. I am using both NegativeBinomialP and ...
1 vote
15 views

### Which model to follow for predicting count of visitors, if the independent variables are all categorical (date, and x(1-5 value))?

I have a dataset about the people visiting the website on each day of each month. Data consists of The session id of each visit , the number of clicks made , country from where the person is , the ...
• 11
23 views

### Help to interpet a GLM negative binomial summary

I used brms in order to conduct a GLM negative binomial analysis. Here is the summary of the model : ...
• 193
14 views

### How to deal with leverages when modelling data?

I am currently modelling my data using a negative binomial. When plotting my leverages, I have one point above my cut off line at $\frac{3p}{n}$. However, when I remove the influential observation and ...
33 views

### What is the distribution of the residuals for a negative binomial GLM?

I am using count data and originally used a Poisson model, however there was a rakes of overdispersion so have now remodelled my data using a Negative Binomial. The problem is, I have no idea what ...
103 views

### How to get incidence rate ratio of negative binomial regression with coefficients?

I'm running a NBR in Python's statsmodel pacakge. I want to see how a categorical variable influences website views. I got the model and coef and other stuff. Now I'm wondering how I interpret these ...
1 vote
45 views

### ZINB boosting model (gamboostLSS) seems off in R, what could be the reason?

I have a dataset containing counts (values from 0 to 30) and different covariates. This is what the distribution of the count data looks like: After fitting a gamlss boosting model in R (with the ...
16 views

### Mixed model with plenty of 0's and a unique fixed effect per a random factor

I am having trouble analysing some of my data. I'm trying to test the effect of treatment (Type) with three levels (Control/Threarment1/Threatment2) on the abundance of Arthropods belonging to ...
1 vote
127 views

### Is there any R packages allow direct MLE estimation of dispersion in negative binomial distribution?

Using the built-in function, I can get ...
11 views

### Comparing model types: zinb and nb

I am modelling variation in the count data which represents number of boats in images. There are a lot of images with 0 counts, and the variance is greater than the mean, so after comparing poisson, ...
85 views

### Normal approximation to negative binomial (Sheldon Ross)

I am stuck at the following question - Every day Jo practices her tennis serve by continually serving until she has had a total of 50 successful serves. If each of her serves is, independently of ...
• 165
1 vote