# Questions tagged [negative-binomial]

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

683 questions
Filter by
Sorted by
Tagged with
10 views

23 views

### Types of Covariates Permitted in Negative Binomial Regression

To the best of my knowledge, the dependent variable (outcome) in a negative binomial regression should ideally represent count data. In R, if the interest is to model rates, I understand the use of <...
61 views

### Round values to fit a negative binomial using GLMMs

I am using a GLMM to model a network metric that ranges from 0 to 100 (contribution to nestedness) and trying to fit a model with four predictors and two random factors (species and site). I have 591 ...
20 views

### How to solve for $k$ in integral? (hypothesis testing)

In a hypothesis testing problem I am stuck at this step, trying to solve for $k$ in the relation: $$F_{NegBin(n,0.5)}(k)=0.05$$ The problem is no matter which cumulative distribution function I ...
29 views

### What does it mean when glm algorithm doesn't converge but still gives results

I'm running many glm models in R (negative binomial regression to be specific) to a fairly large dataset (N = 175,000) with the intention of performing a specification curve analysis. For my case, ...
18 views

### Correct formulas for the mean and variance of negative binomial distribution

According to ScienceDirect and StatTrek, a negative binomial distribution where: $x$ number of trials, $x = \textrm{1, 2, ...}$ $r$ number of failures, $r = \textrm{1, 2, ... }x$ $k$ number of ...
18 views

### Calculating rewards with a negative binomial using expect() in scipy [closed]

I'm trying to model the rewards for a certain game. In that game, you pay 750 of the currency to enter, you play until you lose 3 times or win 7 times, and then you get a reward equal to the number of ...
68 views

### model_count error in ZINB r pscl analysis

I am modeling a mediated zero-inflated negative binomial (ZINB) model. I am following the steps of O'Rourke & Vazquez (2019) A few days ago I was running a different ZINB model which ran ...
17 views

### Defining a wrapper function in glmulti [migrated]

I am new to R scripting and I would like to run glmulti with a wrapper function for a negative binomial family with offset. I would like advice on the following code since I am getting an error ...
23 views

### Poisson/NegBinom model with identity or logarithmic link

I am wondering about the implications of using (1) a logarithmic, and (2) an identity link within a Poisson model for count data. I have read through related posts here on CV: Pros and Cons of Log ...
38 views

### Model Selection- Poisson and Negative Binomial

I have run 2 GLM models with same variable specifications except that one was run with the response variable following a generalized poisson distribution and the other with a negative binomial ...
27 views

### Negative binomial modelling versus transformed linear modeling

My dataset (Data) contains data on distance traveled by an organism (Distance) based on their genotype (the two genotypes are A and B). For each genotype, there are 3 replicate genetic lines (A1,A2,A3,...
8 views

### Deriving PMF from Berger & Berry (1988)

The paper didn't specify the PMF for the image on pg 161. Based on image and description: Stop when observe 4 successes and 4 failures X axis is not limiting trials p(heads) = p(tails) Former ...
10 views

### Weighted zero inflated negative binomial regression

Before encountering the ZINB model, my choice of model was the standard NBR model with the R function glm.nb. My dependent variable is non-negative integer in ...
12 views

### Using exposure in negative binomial model

My model is negative binomial and my dependent variable is the number of crimes per county. One of my independent variables is the population size per county (the unit of analysis is county). I used ...
35 views

### Can I model my analysis as a negative binomial regression problem?

I am working on a research project to identify the individual impact of dominant personalities, and sexual esteem on sadistic behavior. I am also completely new to statistical analysis. Both of my ...
32 views

### Power simulation on glmer.nb gave strange results

I would like to ask for solution or advice on strange result that glmer.nb from lme4 generated when simulating using simR package. I’m working on longitudinal gut microbiome abundance data (23 ...
11 views

### How to find parameter k of negative binomial distribution using size and mu data in R?

I fit a negative binomial distribution and I have size = 0.47 and mu = 134. 85 for population 1, and size = 0.26 and mu = 136.49 in population 2. How do I find the parameter k, to infer which of the ...
9 views

### When theta.ml result will be very deviate from the true theta?

theta.ml using fitted mu from glm.nb() and glm(family = poisson) are all very similar to ...
15 views

### The mean learned by glm.nb is not the same as the true mean?

I am not able to make the predict values to be the same as the true means (mu). I'd expect that they should be the same. Does anybody see there anything wrong in my code? ...
33 views

### What is theta in negative binomial distribution?

https://www.rdocumentation.org/packages/MASS/versions/7.3-51.5/topics/theta.md The above page says this. ...
33 views

### Comparing time series trends of non-linear count data across multiple firms in R

I have data on the number of patent applications per year for 20 years for ten different firms. I am trying to answer the question, "did the number (count) of applications evolve differentially across ...
16 views

### How to compare linear vs negative binomial vs random fit for data?

I'm trying to plot number of offspring (x-axis) vs size of offspring (y-axis). I want to check if the size of offspring has a linear, or negative binomial or randomly fit. I'm trying to statistically ...
40 views

### Distribution when count data have no zero counts

My data are monthly counts of samples submitted to a laboratory for testing. The data have no monthly counts of 0 for when no samples were submitted. How should this data be handled? What distribution/...
32 views

### Hypothesis Testing Using Tail Probability – Negative Binomial Distribution

I am comparing count data in treatment versus control. The question suggests that the count data follows a negative binomial distribution with mean and variance estimated from the controls. To ...
18 views

### Two intercepts for zero-truncated negative binomial model using VGAM

I am trying to understand the first and second intercept for the zero-truncated negative binomial regression model I estimated using VGAM. Below is my syntax: mod.negb <- vglm(ED_Visit ~ Male + ...
24 views

### (Generalised) Negative Multinomial Distribution

Fix some probability vector $( p_1, \ldots, p_N)$, and let $X$ be a categorical random variable with these probabilities, i.e. $$P ( X = x ) = p_x \quad \text{for } x \in \{ 1, \ldots, N \}.$$ ...
43 views

### Mixed effect zero inflated negative binomial model in R: use of Dharma package, glmmTMB and glmmAdaptive

I am having trouble fitting a mixed effect zero inflated negative binomial model to my data using the GLMMadaptive package: negbi_1 <- mixed_model(fixed=MA ~ ST + AG + SU +SO +Y, ...
24 views

### Parameters of a negative binomial don't match the observed moments

I have a dataset which, by the looks of it, closely resembles a negative binomial distribution. It is the number of minutes an event has lasted. Here is the original data: !Raw Data1 I calculate the ...
63 views

### Confused on how to interpret ZINB and Hurdle models

Below are a set of results from a zero-inflated (AIC = 64992.15; BIC = 65280.78) and hurdle model (AIC = 65141.73; BIC = 65430.36) for a dataset (>18000 obs) which describes the number of illicit ...
44 views

### How to conduct and report pairwise comparisons with estimated marginal means?

I have two mouse strains (C57 and CBA) that are exposed to a treatment with three levels (suum, lumb or control). My dependent variable is immune cell counts and the model is a negative binomial with ...
16 views

### Negative Binomial Regression Shrinkage Priors P greater than N case

Can someone suggest some literature review paper or any literature regarding Negative Binomial Regression with Shrinkage priors particularly P>N case? P: no. of variables, N: no. of observations in a ...
48 views

### Interpretation of interaction term in negative binomial Difference-in-Differences regression

I have a question regarding how to interpret an interaction term in a negative binomial Difference-in-Differences (DiD) regression. I use the negative binomial as my dependent variable (crimes) is ...
23 views

### How to interpret the regression co-efficient of a particular variable in a negative binomial regression?

I have the following regression equation with a count variable as the dependent variable and diversity as the predictor. ...
65 views

### glmer.nb does not converge when one variable is included in the model

I encountered an issue when using glmer.nb() to model my data. First I used fitdistr to tell me which distribution fits my data. ...
29 views

### Can we use glmtree for negative binomial distribution?

I'm trying to create a conditional inference tree predicting number of root grafts in relation to distance between roots and number of roots. My variable response has a negative binomial distribution ...
47 views

### Negative Binomial GLM confusing effect on p value of model by changing theta

I am interested in generating a p-value for two small groups of count based data that I believe to show overdispersion. The groups are for example: ...
55 views

### Can interaction estimates be affected by a total number of events

I am testing the interaction of two dummy variables, say Var1 and Var2 in a set of cancers. For each cancer type I want to ...
23 views

### Confidence in Negative Binomial Prediction

I have predicted future demand of stock from observed historical demand projecting a negative binomial demand curve. Demand is extrapolated to multiple periods using this approach. I'm pretty happy ...
53 views

### How do I solve for $x$ in $x =\Biggl(\frac{px}{1-(1-p)x}\Biggr)^n$

I have an equation for the probability generating function of a negative binomial $(n,p)$ distribution: $$G(x)= \Biggl(\frac{px}{1-(1-p)x}\Biggr)^n$$ I'd like to solve for $x$ in the following ...
15 views

### Mixed-Effect Negative Binomial Regression and variation in the estimated coefficients?

Why the introduction of a random slope effect in a two-level mixed effect negative binomial model significantly alters the estimated coefficients, when compared to the estimated coefficients of the ...
21 views

### Does one need to run a poisson regression to estimate the scale parameter before using negative binomial regression?

The negative binomial has two parameter in its distribution. Neg bin has a scale and a probability parameter. I’d imagine the scale parameter estimated in poisson regression is only one of them. Does ...