similar to: zeroinfl problem: cannot get standard errors, hessian has NaN

Displaying 20 results from an estimated 2000 matches similar to: "zeroinfl problem: cannot get standard errors, hessian has NaN"

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 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
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
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
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
2019 Feb 19
1
mle (stat4) crashing due to singular Hessian in covariance matrix calculation
Hi, R developers. when running mle inside a loop I found a nasty behavior. From time to time, my model had a degenerate minimum and the loop just crashed. I tracked it down to "vcov <- if (length(coef)) solve(oout$hessian)" line, being the hessian singular. Note that the minimum reached was good, it just did not make sense to calculate the covariance matrix as the inverse of a
2010 Jun 22
1
Subject: Re ZINB by Newton Raphson??
I have not included the previous postings because they came out very strangely on my mail reader. However, the question concerned the choice of minimizer for the zeroinfl() function, which apparently allows any of the current 6 methods of optim() for this purpose. The original poster wanted to use Newton-Raphson. Newton-Raphson (or just Newton for simplicity) is commonly thought to be the
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 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
2010 Jun 08
2
Please help me
Dear Mr. or Ms.,   I used the R-software to run the zero-inflatoin negative binomial model (zeroinfl()) .   Firstly, I introduced one dummy variable to the model as an independent variable, and I got the estimators of parameters. But the results are not satisfied to me. So I introduced three dummy variables to the model. but I could not get the results. And the error message is
2008 Dec 16
1
Prediction intervals for zero inflated Poisson regression
Dear all, I'm using zeroinfl() from the pscl-package for zero inflated Poisson regression. I would like to calculate (aproximate) prediction intervals for the fitted values. The package itself does not provide them. Can this be calculated analyticaly? Or do I have to use bootstrap? What I tried until now is to use bootstrap to estimate these intervals. Any comments on the code are welcome.
2003 Feb 10
1
Zero rows/cols in the hessian matrix
Dear R experts! I try to minimize a function with external C fitting function. I get the hessian matrix. Here it is: [,1] [,2] [,3] [,4] [1,] 1.8816631 0 0.8859803 0 [2,] 0.0000000 0 0.0000000 0 [3,] 0.8859803 0 0.4859983 0 [4,] 0.0000000 0 0.0000000 0 Second and fourth rows/columns have zero values only. That's OK, because that ones related
2009 Apr 29
2
Optim and hessian
Hi, my name is Marcel R. Lopes. My problem is, I made a code to calculate the estimates of a Cox model with random effects. Used to optimize the R command for this. The estimates were calculated correctly, but the Hessian matrix does not have good values. The same thing was done in SAS and gave good results for the Hessian Matrix. Where is the problem in R? As the Hessian is calculated?. How
2006 Mar 21
1
Hessian from optim()
Hello! Looking on how people use optim to get MLE I also noticed that one can use returned Hessian to get corresponding standard errors i.e. something like result <- optim(<< snip >>, hessian=T) result$par # point estimates vc <- solve(result$hessian) # var-cov matrix se <- sqrt(diag(vc)) # standard errors What is actually Hessian representing here?
2006 Feb 01
1
output hessian matrix in constrOptim
Hi, Is there any way to get the hessian matrix from the "constrOptim" function without supplying gradient function? Thanks. --------------------------------- Bring words and photos together (easily) with [[alternative HTML version deleted]]
2011 Sep 22
1
nlm's Hessian update method
Hi R-help! I'm trying to understand how R's nlm function updates its estimate of the Hessian matrix. The Dennis/Schnabel book cited in the references presents a number of different ways to do this, and seems to conclude that the positive-definite secant method (BFGS) works best in practice (p201). However, when I run my code through the optim function with the method as "BFGS",
2008 Jun 24
1
Hessian in box-constraint problem - concern OPTIM function
Hello all useRs, I am using the OPTIM function with particular interest in the method L-BFGS-B, because it is a box-constraint method. I have interest in the errors estimates too. I make: s.e. <- sqrt( diag( solve( optim(...,method='L-BFGS-B', hessian=TRUE)$hessian ))) but in help say: "Note that this is the Hessian of the unconstrained problem even if the box constraints