Displaying 20 results from an estimated 7000 matches similar to: "Negative Binomial Regression - glm.nb"
2010 Nov 15
1
comparing levels of aggregation with negative binomial models
Dear R community,
I would like to compare the degree of aggregation (or dispersion) of
bacteria isolated from plant material. My data are discrete counts
from leaf washes. While I do have xy coordinates for each plant, it
is aggregation in the sense of the concentration of bacteria in high
density patches that I am interested in.
My attempt to analyze this was to fit negative binomial
2012 Apr 14
1
R Error/Warning Messages with library(MASS) using glm.
Hi there,
I have been having trouble running negative binomial regression (glm.nb)
using library MASS in R v2.15.0 on Mac OSX.
I am running multiple models on the variables influencing the group size of
damselfish in coral reefs (count data). For total group size and two of my
species, glm.nb is working great to deal with overdispersion in my count
data. For two of my species, I am getting a
2004 Jun 15
1
AIC in glm.nb and glm(...family=negative.binomial(.))
Can anyone explain to me why the AIC values are so different when
using glm.nb and glm with a negative.binomial family, from the MASS
library? I'm using R 1.8.1 with Mac 0S 10.3.4.
>library(MASS)
> dfr <- data.frame(c=rnbinom(100,size=2,mu=rep(c(10,20,100,1000),rep(25,4))),
+ f=factor(rep(seq(1,4),rep(25,4))))
> AIC(nb1 <- glm.nb(c~f, data=dfr))
[1] 1047
>
2012 Mar 14
1
Glm and user defined variance functions
Hi,
I am trying to run a generalized linear regression using a negative binomial
error distribution. However, I want to use an overdispersion parameter that
varies (dependent on the length of a stretch of road) so glm.nb will not do.
>From what I've read I should be able to do this using GLM by specifying my
own quasi family and describing the variance function using varfun, validmu,
2010 Feb 14
2
Estimated Standard Error for Theta in zeroinfl()
Dear R Users,
When using zeroinfl() function to fit a Zero-Inflated Negative Binomial (ZINB) model to a dataset, the summary() gives an estimate of log(theta) and its standard error, z-value and Pr(>|z|) for the count component. Additionally, it also provided an estimate of Theta, which I believe is the exp(estimate of log(theta)).
However, if I would like to have an standard error of Theta
2009 Aug 13
2
glm.nb versus glm estimation of theta.
Hello,
I have a question regarding estimation of the dispersion parameter (theta)
for generalized linear models with the negative binomial error structure. As
I understand, there are two main methods to fit glm's using the nb error
structure in R: glm.nb() or glm() with the negative.binomial(theta) family.
Both functions are implemented through the MASS library. Fitting the model
using these
2004 Feb 02
1
glm.poisson.disp versus glm.nb
Dear list,
This is a question about overdispersion and the ML estimates of the
parameters returned by the glm.poisson.disp (L. Scrucca) and glm.nb
(Venables and Ripley) functions. Both appear to assume a negative binomial
distribution for the response variable.
Paul and Banerjee (1998) developed C(alpha) tests for "interaction and main
effects, in an unbalanced two-way layout of counts
2007 Aug 15
0
Negative Binomial: glm.nb
Hi Folks,
I'm playing with glm.nb() in MASS.
Reference: the negative binomial distribution
P(y) = (Gamma(theta+y)/(Gamma(theta)*y!))*(p^theta)*(1-p)^y
y = 0,1,2,...
in the notation of the MASS book (section 7.4), where
p = theta/(mu + theta) so (1-p) = mu/(mu + theta)
where mu is the expected value of Y. It seems from ?glm.nb that
an initial value of theta is either supplied, or
2006 Jul 14
2
Negative Binomial: Simulation
Hi R-Users!
I fitted a negative binomial distribution to my count data using the
function glm.nb() and obtained the calculated parameters
theta (dispersion) and mu.
I would like to simulate values from this negative binomial distribution.
Looking at the function rnbinom() I was looking at the relationship
between the two possible parametrizations of the negative binomial and found
that for this
2012 Oct 22
1
glm.nb - theta, dispersion, and errors
I am running 9 negative binomial regressions with count data.
The nine models use 9 different dependent variables - items of a clinical
screening instrument - and use the same set of 5 predictors. Goal is to
find out whether these predictors have differential effects on the items.
Due to various reasons, one being that I want to avoid overfitting models,
I need to employ identical types of
2012 Oct 19
2
MLE of negative binomial distribution parameters
I need to estimate the parameters for negative binomial distribution (pdf)
using maximun likelihood, I also need to estimate the parameter for the
Poisson by ML, which can be done by hand, but later I need to conduct a
likelihood ratio test between these two distributions and I don't know how
to start! I'm not an expert programmer in R. Please help
--
View this message in context:
2006 Jun 09
1
glm with negative binomial family
I am analysing parasite egg count data and am having trouble with glm with a
negative binomial family.
In my first data set, 55% of the 3000 cases have a zero count, and the
non-zero counts range from 94 to 145,781.
Eventually, I want to run bic.glm, so I need to be able to use glm(family=
neg.bin(theta)). But first I ran glm.nb to get an estimate of theta:
> hook.nb<- glm.nb(fh,
2008 Apr 21
1
estimate of overdispersion with glm.nb
Dear R users,
I am trying to fully understand the difference between estimating
overdispersion with glm.nb() from MASS compared to glm(..., family =
quasipoisson).
It seems that (i) the coefficient estimates are different and also (ii) the
summary() method for glm.nb suggests that overdispersion is taken to be one:
"Dispersion parameter for Negative Binomial(0.9695) family taken to be
2003 Mar 12
2
quasipoisson, glm.nb and AIC values
Dear R users,
I am having problems trying to fit quasipoisson and negative binomials glm.
My data set
contains abundance (counts) of a species under different management regimens.
First, I tried to fit a poisson glm:
> summary(model.p<-glm(abund~mgmtcat,poisson))
Call:
glm(formula = abund ~ mgmtcat, family = poisson)
.
.
.
(Dispersion parameter
2001 Sep 25
2
glm.nb, anova.negbin
Dear R-collegues,
I'm getting an error message (Error in round) when summarising a glm.nb
model, and when using anova.negbin (in R 1.3.1 for windows):
> m.nb <- glm.nb(tax ~ areal)
> m.bn
Call: glm.nb(formula = tax ~ areal, init.theta = 5.08829537115498,
link = log)
Coefficients:
(Intercept) areal
3.03146 0.03182
Degrees of Freedom: 283 Total (i.e. Null); 282
2009 Apr 04
1
summary for negative binomial GLMs (PR#13640)
Full_Name: Robert Kushler
Version: 2.7.2
OS: Windows XP
Submission from: (NULL) (69.246.102.98)
I believe that the negative binomial family (from MASS) should be added to the
list for which dispersion is set to 1.
2010 Jul 06
1
Interpreting NB GLM output - effect sizes?
Hi,
I am trying to find out how to interpret the summary output from a neg
bin GLM?
I have 3 significant variables and I can see whether they have a
positive or negative effect, but I can't work out how to calculate the
magnitude of the effect on the mean of the dependent variable. I used
a log link function so I think I might have to use the antilogs of the
coefficients but I have no idea
2011 Feb 10
2
Comparison of glm.nb and negbin from the package aod
I have fitted the faults.data to glm.nb and to the function negbin from the
package aod. The output of both is the following:
summary(glm.nb(n~ll, data=faults))
Call:
glm.nb(formula = n ~ ll, data = faults, init.theta = 8.667407437,
link = log)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.0470 -0.7815 -0.1723 0.4275 2.0896
Coefficients:
2012 Jun 24
1
MuMIn for GLM Negative Binomial Model
Hello
I am not able to use the MuMIn package (version 1.7.7) for multimodel inference with a GLM Negative Binomial model (It does work when I use GLM Poisson). The GLM Negative Binomial gives the following error statement:
Error in get.models(NBModel, subset = delta < 4) :
object has no 'calls' attribute
Here is the unsuccessful Negative Binomial code.
>
> BirdNegBin
2010 Jun 21
1
glm, poisson and negative binomial distribution and confidence interval
Dear list,
I am using glm's to predict count data for a fish species inside and outside
a marine reserve for three different methods of monitoring.
I run glms and figured out the best model using step function for each
methods used.
I predicted two values for my fish counts inside and outside the reserve
using means of each of the covariates (using predict() )
therefore I have only one value