Displaying 20 results from an estimated 20000 matches similar to: "using stepAIC with negative binomial regression - error message"
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 May 05
2
Stepwise logistic Regression with significance testing - stepAIC
Hello R-Users,
I have one binary dependent variable and a set of independent variables (glm(formula,…,family=”binomial”) ) and I am using the function stepAIC (“MASS”) for choosing an optimal model. However I am not sure if stepAIC considers significance properties like Likelihood ratio test and Wald test (see example below).
> y <- rbinom(30,1,0.4)
> x1 <- rnorm(30)
> x2
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 Jan 26
1
glm StepAIC with all interactions and update to remove a term vs. glm specifying all but a few terms and stepAIC
Problem:
I am sorting through model selection process for first time and want to make
sure that I have used glm, stepAIC, and update correctly. Something is
strange because I get a different result between:
1) a glm of 12 predictor variables followed by a stepAIC where all
interactions are considered and then an update to remove one specific
interaction.
vs.
2) entering all the terms
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)
2008 Jul 28
1
Negative Binomial Regression
Hello.
I am attempting to duplicate a negative binomial regression in R. SAS uses
generalized estimating equations for model fitting in the GENMOD procedure.
proc genmod data=mydata (where=(gender='F'));
by agegroup;
class id gender type;
model count = var1 var2 var3 /dist=NB link=log offset=lregtm;
repeated subject=id /type=exch;
run;
Since my dataset has several observations for
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
2010 Nov 24
0
negative binomial regression, unbalanced panel
I am a student who is doing empirical work for his thesis and trying to
switch to R. I am familiar with Stata, and at the moment I am trying to
replicate some of my previous work.
I have a large unbalanced panel data set, observations for different
countries between 1970 and 2007. My dependent variable is an
overdispersed count. So far I have used fixed-effects negative binomial
regression,
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
2011 Feb 23
0
negative binomial latent class regression in package flexmix
Hello list,
Has anyone had any luck creating an M-step driver for negative
binomial regression for use with package flexmix? I've had a look
here: http://cran.r-project.org/web/packages/flexmix/vignettes/flexmix-intro.pdf
as well as poking around in the flexmix source, but I haven't had much
luck getting anything to work. I can't figure out how to a) come up
with an initial estimate
2003 Jun 20
0
negative binomial regression
I have been using the negative binomial regression function in the MASS
library to generate incidence rate ratios and confidence intervals.
Can this function also generate a gradient value that would estimate
the slope between the dependent and independent variables? or can it
be generated by passing the results to another function (chi-square?)
Ross
2011 Oct 11
0
How to calculate percentage variation in a zero-inflated negative binomial regression model
I am a novice in R but using R 2.13.1 in Windows I wish to be able to
calculate the percentage variation in a
zero-inflated negative binomial regression model that is explained by the
two predictors in my model. My response variable was no. of dung-piles per
km and the predictor of excess zeros was distance to major road (km) .
Thanks in advance.
Boafo
[[alternative HTML version
2012 May 02
0
Performing negative binomial regression on data, using stepwise selection
hello all,
I've been trying for some time to try and model a big dataset using
generalized linear models, or more precisely negative binomial regression.
Unfortunately i have too many explanatory variables and i'd like to cut
some of them off using a stepwise selection method.
i've been struggeling with the code for quite a long period and can't find
a way to do this....any ideas?
2010 Feb 14
1
how to delete a parameter from list after running negative binomial error
Hello everyone,
Sorry if my question is not clear, my first language is not English, but
Portuguese.
I am building a model for my data, using non-binomial error. I am having a
bit of a problem when updating the model to remove parameters that I no do
no autocorrelate with other variables (I have used a autocorrelation
function for this).
So my first model looks like this:
2003 Mar 24
1
negative binomial regression
I would like to know if it is possible to perform negative binomial
regression with rate data (incidence density) using the glm.nb (in
MASS) function.
I used the poisson regression glm call to assess the count of injuries
across census tracts. The glm request was adjusted to handle the data
as rates using the offset parameter since the population of census
tracts can vary by a factor of
2011 May 23
1
Interpreting the results of the zero inflated negative binomial regression
Hi,
I am new to R and has been depending mostly on the online tutotials to learn
R. I have to deal with zero inflated negative binomial distribution. I am
however unable to understand the following example from this link
http://www.ats.ucla.edu/stat/r/dae/zinbreg.htm
The result gives two blocks.
*library(pscl)
zinb<-zeroinfl(count ~ child + camper | persons, dist = "negbin", EM =
2013 Jun 04
1
Zero-Inflated Negative Binomial Regression
Hi!
I'm running a zero-inflated negative binomial regression on a large (n=54822) set of confidential data. I'm using the code:
ZerNegBinRegress<-zeroinfl(Paper~.|., data=OvsP, dist="negbin", EM=TRUE)
And keep getting the error:
Warning message:
glm.fit: fitted probabilities numerically 0 or 1 occurred
I've done enough reading about this error to realize that I have
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
2010 Jul 15
1
Longitudinal negative binomial regression - robust sandwich estimator standard errors
Hi All,
I have a dataset, longitudinal in nature, each row is a 'visit' to a clinic,
which has numerous data fields and a count variable for the number of
'events' that occurred since the previous visit.
~50k rows, ~2k unique subjects so ~25 rows/visits per subject, some have 50
some have 3 or 4.
In STATA there is an adjustment for the fact that you have multiple rows per
2003 Dec 04
2
Comparing Negative Binomial Regression in Stata and R. Constants differ?
I looked for examples of count data that might interest the students and
found this project about dropout rates in Los Angeles High Schools. It
is discussed in the UCLA stats help pages for the Stata users:
http://www.ats.ucla.edu/stat/stata/library/count.htm
and
See: http://www.ats.ucla.edu/stat/stata/library/longutil.htm
To replicate those results, I used R's excellent foreign package to