similar to: Estimating theta for negative binomial model

Displaying 20 results from an estimated 10000 matches similar to: "Estimating theta for negative binomial model"

2010 May 19
8
Generating all possible models from full model
Is there a function that will allow me to run all model iterations if I specify a full model? I am using information criteria to choose between possible candidate models. I have been writing out all possible model combinations by hand, and I am always worried that I am missing models or have made a mistake somewhere. It is also difficult to alter models if I want to change a term. For example,
2009 Mar 21
1
Goodness of fit for negative binomial model
Dear r list,   I am using glm.nb in the MASS package to fit negative binomial models to data on manta ray abundance, and AICctab in the bbmle package to compare model IC.  However, I need to test for the goodness of fit of the full model, and have not been able to find a Pearson's Chi Squared statistic in any of the output.  Am I missing it somewhere?  Is there a way to run the test using
2009 Feb 18
1
using stepAIC with negative binomial regression - error message help
Dear List, I am having problems running stepAIC with a negative binomial regression model.  I am working with data on manta ray abundance, using 20 predictor variables.  Predictors include variables for location (site), time (year, cos and sin of calendar day, length of day, percent lunar illumination), oceanography (sea surface temp mean and std, sea surface height mean and std), weather (cos
2009 Aug 30
1
Trying to rename spatial pts data frame slot that isn't a slot()
Dear List, I am analyzing the home range area of fish and seem to have lost the individuals ID names during my manipulations, and can't find out how to rename them. I calculated the MCP of the fish using mcp() in Adehabitat. MCP's were converted to spatial points data frame and exported to qGIS for manipulations. At this point the ID names were lost. I brought the manipulated
2009 Sep 28
1
xyplot help - colors and break in plot
Dear List, I am new to lattice plots, and am having problems with getting my plot to do what I want. Specifically: 1. I would like the legend to have the same symbols as the plot. I tried simpleKey but can't seem to get it to work with autoKey. Right now my plot has dots (pch=19) and my legend shows circles. 2. I have nine groups but xyplot seems to only be using seven colors, so two
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
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:
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,
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
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,
2005 Apr 05
2
GLMs: Negative Binomial family in R?
Greetings R Users! I have a data set of count responses for which I have made repeated observations on the experimental units (stream reaches) over two air photo dates, hence the mixed effect. I have been using Dr. Jim Lindsey's GLMM function found in his "repeated" measures package with the "poisson" family. My problem though is that I don't think the poisson
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
2009 Aug 17
2
unnecessary braces?
the version 2 parser thinks I have unnecessary braces, but I can't find any. False positive or am I missing something? If a false positive, is there any way to work around the warning? * checking Rd files against version 2 parser ... WARNING Warning: ./man/dbetabinom.Rd:32-34: Unnecessary braces at ?{p(x) = % (C(N,x)*Beta(N-x+theta*(1-p),x+theta*p))/% Beta(theta*(1-p),theta*p)}?
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 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
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
2003 Jan 17
2
Negative Binomial modelling
I have some data which I am trying to fit with a negative binomial distribution. I have found the glm.nb function from MASS. I have reason to believe that the mean parameter mu depends on certain factors, and that the shape parameter theta depends on others. If, say, the factors are P and Q, it might be that mu ~ P:Q and theta ~ P (where mu ~ P:Q means that mu is a function of the pair (P,Q))
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
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
2008 Dec 11
2
negative binomial lmer
Hi; I am running generalized linear mixed models (GLMMs) with the lmer function from the lme4 package in R 2.6.2. My response variable is overdispersed, and I would like (if possible) to run a negative binomial GLMM with lmer if possible. I saw a posting from November 15, 2007 which indicated that there was a way to get lmer to work with negative binomial by assigning: family =