similar to: Negatie Binomial Regression: "Warning while fitting theta: alternation limit reached"

Displaying 20 results from an estimated 20000 matches similar to: "Negatie Binomial Regression: "Warning while fitting theta: alternation limit reached""

2010 May 03
2
Estimating theta for negative binomial model
Dear List, I am trying to do model averaging for a negative binomial model using the package AICcmodavg. I need to use glm() since the package does not accept glm.nb() models. I can get glm() to work if I first run glm.nb and take theta from that model, but is there a simpler way to estimate theta for the glm model? The two models are: mod.nb<-glm.nb(mantas~site,data=mydata)
2012 Dec 07
1
Negative Binomial GAMM - theta values and convergence
Hi there, My question is about the 'theta' parameter in specification of a NB GAMM. I have fit a GAM with an optimum structure of: SB.gam4<-gam(count~offset(vol_offset)+ s(Depth_m, by=StnF, bs="cs")+StageF*RegionF, family=negbin(1, link=log), data=Zoop_2011[Zoop_2011$SpeciesF=='SB',]) However, this GAM shows heterogeneity in the
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,
2003 Aug 12
1
Negative binomial theta
Hi, I'm trying to use the command "glm.nb" in library(MASS) to test for a significant difference in the aggregation parameter "theta" between the three levels of a factor. Any help gratefully received! Martin. Martin Hoyle, School of Life and Environmental Sciences, University of Nottingham, University Park, Nottingham, NG7 2RD, UK Webpage:
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
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
2011 Nov 17
1
How to Fit Inflated Negative Binomial
Dear All, I am trying to fit some data both as a negative binomial and a zero inflated binomial. For the first case, I have no particular problems, see the small snippet below library(MASS) #a basic R library set.seed(123) #to have reproducible results x4 <- rnegbin(500, mu = 5, theta = 4) #Now fit and check that we get the right parameters fd <- fitdistr(x4, "Negative
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
2013 Mar 15
0
Poisson and negbin gamm in mgcv - overdispersion and theta
Dear R users, I am trying to use "gamm" from package "mgcv" to model results from a mesocosm experiment. My model is of type M1 <- gamm(Resp ~ s(Day, k=8) + s(Day, by=C, k=8) + Flow + offset(LogVol), data=MyResp, correlation = corAR1(form= ~ Day|Mesocosm), family=poisson(link=log)) where the response variable is counts, offset by the
2009 Feb 18
1
Help on warning message from Neg. Binomial error during glm
I am using glm.nb, a ~b*c ( b is categorical and c is continuous). when I run this model I get the warning message: Warning messages: 1: In theta.ml(Y, mu, sum(w), w, limit = control$maxit, trace = control$trace > : iteration limit reached 2: In theta.ml(Y, mu, sum(w), w, limit = control$maxit, trace = control$trace > : iteration limit reached What does this mean? -- Graduate
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 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
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 28
2
negative binomial lmer
To whom it may concern: I have a question about how to appropriately conduct an lmer analysis for negative binomially distributed data. I am using R 2.2.1 on a windows machine. I am trying to conduct an analysis using lmer (for non-normally distributed data and both random and fixed effects) for negative binomially distributed data. To do this, I have been using maximum likelihood,
2007 Dec 09
0
Lmer output for negative binomial data
Dear R-list, May I ask for help in interpretating the output of 'lmer' (from the lme4 package) when dealing with negative binomial data ? I'm using the functions glm.nb (from the MASS package) and lmer (from the lme4) to fit respectively fixed-effects and mixed-effects generalized linear models to data, generated from a negative binomial distribution : count ~ Neg.Bin (mu, theta).
2005 Mar 03
1
Negative binomial regression for count data
Dear list, I would like to fit a negative binomial regression model as described in "Byers AL, Allore H, Gill TM, Peduzzi PN., Application of negative binomial modeling for discrete outcomes: a case study in aging research. J Clin Epidemiol. 2003 Jun;56(6):559-64" to my data in which the response is count data. There are also 10 predictors that are count data, and I have also 3
2005 Mar 11
0
Negative binomial regression for count data,
Dear list, I would like to know: 1. After I have used the R code (http://pscl.stanford.edu/zeroinfl.r) to fit a zero-inflated negative binomial model, what criteria I should follow to compare and select the best model (models with different predictors)? 2. How can I compare the model I get from question 1 (zero-inflated negative binomial) to other models like glm family models or a logistic
2006 Feb 18
1
truncated negative binomial using rnegbin
Dear R users, I'm wanting to sample from the negative binomial distribution using the rnegbin function from the MASS library to create artificial samples for the purpose of doing some power calculations. However, I would like to work with samples that come from a negative binomial distribution that includes only values greater than or equal to 1 (a truncated negative binomial), and I
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
2010 Feb 04
1
Zero inflated negat. binomial model
Dear R crew: I think I am in the right mailing list. I have a very simple dataset consisting of two variables: cestode intensity and chick size (defined as CAPI). Intensity is clearly overdispersed, with way too many zeroes. I'm interested in looking at the association between these two variables, i.e. how well does chick size predict tape intensity? I fit a zero inflated negat. binomial