Displaying 20 results from an estimated 600 matches similar to: "Deviance of zeroinfl/hurdle models"
2011 Mar 31
1
rank of Matrix
Dear list,
Can anyone tell me how to obtain the rank of a sparse Matrix, for
example from package Matrix (class dgCMatrix)? Here is an example of
QR decomposition of a sparse matrix (from the sparseQR class help).
library(Matrix)
data(KNex)
mm <- KNex$mm
str(mmQR <- qr(mm))
Similarly, using the functions/classes from the relatively new
MatrixModels package:
library(MatrixModels)
2010 Jun 17
1
plotting radial dendrograms
Dear list,
I am trying to plot a radial dendrogram using the ape package, which
requires my data to be of class 'phylo'. Currently I have my
dendrogram stored as an object of class 'dendrogram' which was
produced from an outside bit of C code, but was made into an object of
class 'igraph.eigenc' and converted to a dendrogram using
'as.dendrogram()' from the igraph
2011 Feb 28
1
mixture models/latent class regression comparison
Dear list,
I have been comparing the outputs of two packages for latent class
regression, namely 'flexmix', and 'mmlcr'. What I have noticed is that
the flexmix package appears to come up with a much better fit than the
mmlcr package (based on logLik, AIC, BIC, and visual inspection). Has
anyone else observed such behaviour? Has anyone else been successful
in using the mmlcr
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
2010 Oct 04
0
spatial interaction (gravity) model as Poisson regression
Dear list,
I posted essentially this same question to the r-sig-geo mailing list
last week with no response :( Unfortunately I am no closer to reaching
a solution, so I now post it here (with some clarifications) in the
hope that someone following this list might have an answer for me:
Has anyone had much experience with spatial interaction (or gravity)
models, specifically in the form of
2011 Mar 27
0
model diagnostics for MatrixModels
Dear list,
I have been working with the MatrixModels package quite a bit this
week, and it is proving to be extremely valuable for my current work
(I am working with several factors with many levels, leading to a
sparse model matrix). However, as my knowledge of statistical theory
leaves much to be desired, there are certain aspects of model
evaluation etc that I am having trouble with. Has
2011 May 26
0
'constrained' negative.binomial model estimates
Hello list,
I am not sure if the terminology that I am using here is widely used,
however, I provide an example in the hopes that my problem will become
clear. My basic problem is that I am unsure of how to 'constrain' my
model estimates to reproduce the aggregate (by factor levels) observed
dependent variable for a negative.binomial model. I realize this
sounds rather vague, so I provide
2012 Aug 22
0
hat matrix for zeroinfl and hurdle objects
Hi,
I am wondering if there is an easy way to access the hat matrix for
zeroinfl and hurdle objects in the pscl library?
Thanks,
Chris
[[alternative HTML version deleted]]
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
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 have 0 value
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
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
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
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
2013 Apr 03
3
Deviance in Zero inflated models
Dear list,
I am running some zero inflated models and would like to know what the
deviance of the models. Unlike running a normal GLM where the deviance is
displayed in the summary all that is displayed in a summary of the zero
inflated model is the log likelihood. I hope this isn't a read the manual
question, and if it is I apologize for wasting your time, but if you could
still send me a
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
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, Y, family =
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 27 17 12 1 2 1 1
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
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. As such I
decided to try adding pblack^2 to the model to see