Displaying 20 results from an estimated 76 matches for "zeroinfl".
2009 Oct 23
3
opposite estimates from zeroinfl() and hurdle()
Dear all,
A question related to the following has been asked on R-help before, but
I could not find any answer to it. Input will be much appreciated.
I got an unexpected sign of the "slope" parameter associated with a
covariate (diam) using zeroinfl(). It led me to compare the estimates
given by zeroinfl() and hurdle():
The (significant) negative estimate here is surprising, given the
biology of the species:
> summary(zeroinfl(bnl ~ 1| diam, dist = "poisson", data = valdaekar,
EM = TRUE))
Count model coefficients (poisson wi...
2012 Mar 04
2
Can't find all levels of categorical predictors in output of zeroinfl()
Hello,
I?m using zero-inflated Poisson regression via the zeroinfl() function to
analyze data on seed-set of plants, but for some reason, I don?t seem to be
getting the output for all three levels of my two categorical predictors.
More about my data and model:
My response variable is the number of viable seeds (AVInt), and my two
categorical predictors are eleva...
2008 Feb 18
1
fitted.values from zeroinfl (pscl package)
Hello all:
I have a question regarding the fitted.values returned from the
zeroinfl() function. The values seem to be nearly identical to those
fitted.values returned by the ordinary glm(). Why is this, shouldn't
they be more "zero-inflated"?
I construct a zero-inflated series of counts, called Y, like so:
b= as.vector(c(1.5, -2))
g= as.vector(c(-3, 1))
x <- r...
2009 Jan 22
1
help using zeroinfl()
Hi all,
I have been trying to use zeroinfl() with the pscl package with R version 2.1.1. and with the newest versions of the contrib packages compatible with R 2.1.1.
I have read the examples, the vignette and all the posts relating to zeroinfl() but I am still confused as to how to structure the model.
Here is a small example; the error...
2006 Jan 24
1
non-finite finite-difference value[]
Dear R-helpers,
running a zeroinflated model of the following type:
zinb = zeroinfl(count=response ~., x = ~ . - response, z = ~. - response,
dist = "negbin", data = t.data, trace = TRUE)
generates the following message:
Zero-Inflated Count Model
Using logit to model zero vs non-zero
Using Negative Binomial for counts
dep...
2007 Jul 26
1
zeroinfl() or zicounts() error
I'm trying to fit a zero-inflated poisson model using zeroinfl() from the
pscl library. It works fine for most models I try, but when I include either
of 2 covariates, I get an error.
When I include "PopulationDensity", I get this error: Error in solve.default
(as.matrix(fit$hessian)) : system is computationally singular:
reciprocal condition...
2012 Nov 09
1
predict.zeroinfl not found
Hi Just a quick problem that I hope is simple to resolve. I'm doing some work with zero inflated poisson models using the pscl package. I can build models using zeroinfl and get outputs fom them with no problem, but when I try to use the predict.zeroinfl function, I get Error: could not find function "predict.zeroinfl".
I was using an older version of R, but still had the same problem when I installed 2.15.2. I'm also using R studio 0.95.263 and a...
2008 Sep 14
0
Question on glm.nb vs zeroinfl vs hurdle models
Good afternoon,
I?m in need of an advice regarding a proper use of glm.nb, zeroinfl or hurdle with my dataframe.
I can not provide a self-contained example, since I need an advice on this current dataset and its ?contradictory? results.
So.... i have a dataset which contains 1309 cases and 11 variables, highly right-skewed and heavily zeroinflated (with over 1100 cases that ha...
2011 Jul 12
2
Deviance of zeroinfl/hurdle models
Dear list, I'm wondering if anyone can help me calculate the deviance
of either a zeroinfl or hurdle model from package pscl?
Even if someone could point me to the correct formula for calculating
the deviance, I could do the rest on my own.
I am trying to calculate a pseudo-R-squared measure based on the
R^{2}_{DEV} of [1], so I need to be able to calculate the deviance of
the full and...
2006 Jul 20
0
Convergence warnings from zeroinfl (package pscl)
Dear R-Helpers,
Can anyone please help me to interpret warning messages from zeroinfl
(package pscl) while fitting a zero inflated negative binomial model?
The console reports convergence and the parameters seam reasonable, but
these
<<Warning messages:
1: algorithm did not converge in: glm.fit(X, Y, family = poisson())
2: fitted rates numerically 0 occurred in: glm.fit(X,...
2012 May 05
0
Getting predicted values from a zero-inflated negative binomial using zeroinfl()
Hi,
I am a little confused at the output from predict() for a zeroinfl object.
Here's my confusion:
## From zeroinfl package
fm_zinb2 <- zeroinfl(art ~ . | ., data = bioChemists, dist = "negbin")
## The raw zero-inflated overdispersed data
> table(bioChemists$art)
0 1 2 3 4 5 6 7 8 9 10 11 12 16 19
275 246 178 84 67...
2012 Jul 25
3
zeroinfl problem: cannot get standard errors, hessian has NaN
...ave NA's for standard errors:
The hessians also have NaN's (same for m2 and m3).
What should I do about it? It there a way to obtain the hessian without
transforming my variables? I will greatly appreciate your help!
--
View this message in context: http://r.789695.n4.nabble.com/zeroinfl-problem-cannot-get-standard-errors-hessian-has-NaN-tp4637715.html
Sent from the R help mailing list archive at Nabble.com.
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...
2010 Feb 11
1
Zero-inflated Negat. Binom. model
...association between these two variables,
i.e. how well does chick size predict tape intensity?
Since I have a small sample size, I fit a zero inflated negat. Binomial (not
Poisson) model using the "pscl" package.
I built tried two models and got the outputs below.
> model <- zeroinfl(Int_Cesto ~ CAPI, dist = "negbin", EM = TRUE)
Call:
zeroinfl(formula = Int_Cesto ~ CAPI, dist = "negbin", EM = TRUE)
Count model coefficients (negbin with log link):
(Intercept) CAPI
-2.99182 0.06817
Theta = 0.4528
Zero-inflation model coefficients (bi...
2010 Mar 03
1
Zero inflated negative binomial
Hi all,
I am running the following model:
> glm89.nb <- glm.nb(AvGUD ~ Year*Trt*Micro)
where Year has 3 levels, Trt has 2 levels and Micro has 3 levels.
However when I run it has a zero inflated negative binomial (as I have lots
of zeros) I get the below error message:
> Zinb <- zeroinfl(AvGUD ~ Year*Trt*Micro |1, data = AvGUD89, dist =
"negbin")
Error in optim(fn = loglikfun, gr = gradfun, par = c(start$count,
start$zero, :
non-finite value supplied by optim
For what I have read I think the problem is that for Year level 3 there is
no Trt 1 and for Year level 1 there...
2009 Nov 29
1
Convergence problem with zeroinfl() and hurdle() when interaction term added
Hello,
I have a data frame with 1425 observations, 539 of which are zeros. I
am trying to fit the following ZINB:
f3<-formula(Nbr_Abs~ Zone * Year + Source)
ZINB2<-zeroinfl(f3, dist="negbin", link= "logit", data=TheData,
offset=log(trans.area), trace=TRUE)
Zone is a factor with 4 levels, Year a factor with 27 levels, and
Source a factor with 3 levels. Nbr_Abs is counts of a species that
shows a high level of aggregation. These counts are offset by...
2010 Apr 12
1
zerinfl() vs. Stata's zinb
Hello,
I am working with zero inflated models for a current project and I am
getting wildly different results from R's zeroinfl(y ~ x, dist="negbin")
command and Stata's zinb command. Does anyone know why this may be? I find
it odd considering that zeroinfl(y ~ x, dist="poisson") gives identical to
output to Stata's zip function.
Thanks,
--david
[[alternative HTML version deleted]]
2008 Dec 11
1
Error fitting ZIP with zeroinfl()
I am attempting to fit a full zero-inflated Poisson model then use
backward elimination to arrive at the best-fitting model. When I try to
fit the model with zeroinfl() I get this error:
Error in while (abs((ll_old - ll_new)/ll_old) > control$reltol) { :
missing value where TRUE/FALSE needed
Any suggestions?
Thanks for your help!
Paige Barlow
MS Student
Virginia Tech
Dept Fish and Wildlife
2009 Oct 30
0
NA values in Standard Error for zeroinfl()
I am fitting a model using zeroinfl() and it runs without errors,
returning results that are generally consistent with my hypotheses.
One of my variables is percent black (pblack). This variable was highly
significant in some of the other count models I ran on the way to my
current formulation. It is not significant in this model...
2024 Jan 04
1
Obtaining a value of pie in a zero inflated model (fm-zinb2)
Are you referring to the zeroinfl() function in the countreg package? If
so, I think
predict(fm_zinb2, type = "zero", newdata = some.new.data)
will give you pi for each combination of covariate values that you
provide in some.new.data
where pi is the probability to observe a zero from the point mass component.
As to y...