Displaying 20 results from an estimated 50000 matches similar to: "glm.nb() giving strongly different results"
2013 Feb 28
3
Negative Binomial Regression - glm.nb
Dear all,
I would like to ask, if there is a way to make the variance / dispersion parameter $\theta$ (referring to MASS, 4th edition, p. 206) in the function glm.nb dependent on the data, e.g. $1/ \theta = exp(x \beta)$ and to estimate the parameter vector $\beta$ additionally.
If this is not possible with glm.nb, is there another function / package which might do that?
Thank you very much for
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:
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
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
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
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
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
2008 Apr 07
1
Anova function and glm.nb
Hi All,
I am using the glm.nb function from the MASS package (current version)
to fit and compare GLMs with negative binomial error distributions. My
question is: what is the appropriate method to use in the anova function
to compare models? If only one fitted object like
m<-glm.nb(number<-p+sal+temp,data=data)
is specified in the anova function (anova(m)), a fixed theta is used to
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
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
2002 Jun 20
1
Possible bug with glm.nb and starting values (PR#1695)
Full_Name: Ben Cooper
Version: 1.5.0
OS: linux
Submission from: (NULL) (134.174.187.90)
The help page for glm.nb (in MASS package) says that it takes "Any other
arguments for the glm() function except family"
One such argument is start "starting values for the parameters in the linear
predictor."
However, when called with starting values glm.nb returns:
Error in
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
>
2000 Jan 08
2
MASS glm.nb: Offset fails
I came to R from GLIM and its glm. My data sets (ecological community data)
are severely over-dispersed, and so I was delighted to find out that the MASS
library has glm.nb which is an advancement from the GLIM macros I had used
(N.E.Breslow, Applied Statistics 33, 38--44; 1984). However, I need to use
offset, but that failed.
I am not (yet --- hopefully) fluent enough in R to be able to
2011 May 16
2
Post-hoc tests in MASS using glm.nb
I am struggling to generate p values for comparisons of levels (post-hoc
tests) in a glm with a negative binomial distribution
I am trying to compare cell counts on different days as grown on different
media (e.g. types of cryogel) so I have 2 explanatory variables (Day and
Cryogel), which are both factors, and an over-dispersed count variable
(number of cells) as the response. I know that both
2005 Jun 02
1
glm with variance = mu+theta*mu^2?
How might you fit a generalized linear model (glm) with variance =
mu+theta*mu^2 (where mu = mean of the exponential family random variable
and theta is a parameter to be estimated)?
This appears in Table 2.7 of Fahrmeir and Tutz (2001) Multivariate
Statisticial Modeling Based on Generalized Linear Models, 2nd ed.
(Springer, p. 60), where they compare "log-linear model fits to
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,
2014 Nov 13
2
Comportamiento extraño de glm.nb
(Perdón, no puse asunto en el post original)
Ah, corremos R 3.0.2 y l alibrería MASS 7.3-29
Estimados todos:
Os escribo porque tengo un problema que nos está dejando un poco
trastornadillos. Probablemente sea uno de esos que los ve un experto a
un kilómetro y dice ¡oh! toca aquí. Pero nos trae de cabeza.
El caso es que aquí usamos un script para calcular ciertos parámetros
relacionados con el
2012 Feb 10
1
Trust in a glm.nb model results with an itereation limit reached
Hello to everyone.
I'm fitting a glm.nb model to a count data. I'm using about 8 predictive
variables.
Once a run the script I do get a result but it tells me that the iteration
limit has been reached.
So, can i trust the results given by the model?
Could it be a multicollinearity problem?
Thank you for taking the time to help me.
Greetings
Lucas.
--
View this message in context:
2007 Jan 06
2
negative binomial family glm R and STATA
Dear Lister,
I am facing a strange problem fitting a GLM of the negative binomial
family. Actually, I tried to estimate theta (the scale parameter)
through glm.nb from MASS and could get convergence only relaxing the
convergence tolerance to 1e-3. With warning messages:
glm1<-glm.nb(nbcas~.,data=zonesdb4,control=glm.control(epsilon = 1e-3))
There were 25 warnings (use warnings() to see
2004 Mar 28
4
Could someone email me with the code for glm.nb ?
Hi -- subject says all. I just want the code for that function,
which I guess was in Venables and Ripley as early as 1994.
Well, and for any of the sub-functions that glm.nb calls. I
can't install the entire MASS library.
If the code for just glm.nb (again, don't want to touch the MASS
library, last time I tried to install it was a complete nightmare and
fiasco) is somewhere on a