Displaying 20 results from an estimated 400 matches similar to: "opposite estimates from zeroinfl() and hurdle()"
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 elevation (Elev) and Treatment
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 <- runif(100) # x
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 number = 1.91306e-34
When I
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 message is the same for big data sets
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
2012 Jul 25
3
zeroinfl problem: cannot get standard errors, hessian has NaN
Hi!
I have three models.
In the first model, everything is fine.
However, in the second and third models, I have 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:
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
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 null
2002 Oct 31
7
Symbols for male/female
Dear all,
I would like to use the biological symbols for male and female as plotting
symbols in a scatterplot (ideally filled and non-filled). R does not seem
to have these symbols using pch= in plot() nor are they implemented via
expression() or at least I did not find them. I found that the symbols are
e.g. available in the wasysym and the marvosym package in LaTeX.
I have coded two very rough
2002 Oct 31
7
Symbols for male/female
Dear all,
I would like to use the biological symbols for male and female as plotting
symbols in a scatterplot (ideally filled and non-filled). R does not seem
to have these symbols using pch= in plot() nor are they implemented via
expression() or at least I did not find them. I found that the symbols are
e.g. available in the wasysym and the marvosym package in LaTeX.
I have coded two very rough
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
2016 Apr 03
1
apply mean function to a subset of data
Here are several ways to get there, but your original loop is fine once it is corrected:
> for (i in 1:2)  smean[i] <- mean(toy$diam[toy$group==i][1:nsel[i]])
> smean
[1] 0.271489 1.117015
Using sapply() to hide the loop:
> smean <- sapply(1:2, function(x) mean((toy$diam[toy$group==x])[1:nsel[x]]))
> smean
[1] 0.271489 1.117015
Or use head()
> smean <- sapply(1:2,
2006 Aug 09
1
nested ANOVA using lme
I have an ANOVA model with 2 factors "Environment" and "Site", 
"Diameter" is the response variable. Site should be nested within 
Environment. Site is also a random factor while Environment is fixed. I 
can do this analysis using the "aov" function by using these commands:
 >model<-aov(Diam~Env+Error(Env%in%Site),data=environ)
 >summary(model)
2010 Oct 03
1
scatterplot error message
Hi All. I am a new R user.  Trying to do scatterplot.  Not sure how to
resolve this error message
 
A<-subset (ErablesGatineau, station=="A")
> B<-subset (ErablesGatineau, station=="B")
> 
> plot(diam ~ biom)
> abline(lm(diam ~ biom), col = "red")
> 
> goodcases <- !(is.na(diam) | is.na(biom))
> lines(lowess(diam[goodcases] ~
2016 Apr 02
0
apply mean function to a subset of data
Hi Pedro,
This may not be much of an improvement, but it was a challenge.
selvec<-as.vector(matrix(c(nsel,unlist(by(toy$diam,toy$group,length))-nsel),
 ncol=2,byrow=TRUE))
TFvec<-rep(c(TRUE,FALSE),length.out=length(selvec))
toynsel<-rep(TFvec,selvec)
by(toy[toynsel,]$diam,toy[toynsel,]$group,mean)
Jim
On 4/3/16, Pedro Mardones <mardones.p at gmail.com> wrote:
> Dear all;
>
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
2016 Apr 02
3
apply mean function to a subset of data
Dear all;
This must have a rather simple answer but haven't been able to figure it
out: I have a data frame with say 2 groups (group 1 & 2). I want to select
from group 1 say "n" rows and calculate the mean; then select "m" rows from
group 2 and calculate the mean as well. So far I've been using a for loop
for doing it but when it comes to a large data set is
2002 Sep 30
2
Decompose numerical factor into orthog. poly parts
Consider the following analysis of a class experiment done as a Latin Square:
> spinner <- gl(4,4,16,label=c("Murray","Angela","Shasha","Stephen"))
> order <- gl(4,1,16)
> treat <- scan()
1:  1 2 4 3
5:  4 3 1 2
9:  3 4 2 1
13:  2 1 3 4
17: 
Read 16 items
> coin <-
2006 Jan 26
1
[R-SIG-Mac] Hist for different levels of a factor
The list of your interest is R-help not R-sig-mac
stefano
Il giorno 26/gen/06, alle ore 01:20, Sylvain Charlat ha scritto:
> Hi,
>
> Is there any simple way to get histogram for different levels of  
> factor?
>
> Say you have the following data set:
>
>  Island Sp.diam
>  Moorea 1.21
>  Moorea 1.27
>  Moorea 1.28
>  Moorea 1.22
>  Moorea 1.28
>  Rurutu
2006 Jan 25
1
How to use rfm.test ? (Package MarkedPointProcess)
I would like to compute the MC test (rfm.test) available in the package MarkedPointProcess (for the data BITOEK for example) in order to test the
dependence between the marks and their locations. Why the syntax of rfm.test is false here? I have the message :
******************************
ML WARNING! Forbidden values! -- if there are too many warnings try narrower lower and upper bounds for the