Displaying 1 result from an estimated 1 matches for "rzinb".
Did you mean:
zinb
2008 Apr 18
2
rzinb (VGAM) and dnbinom in optim
...;. I've tried a wrapper function but it still hangs. An example:
#set up dummy data,load VGAM, which is where I am getting the zero-inflated neg binom
#I get the same problem without VGAM, using dnbinom in the wrapper instead.
library(VGAM)
phi <- 0.09
size <- 0.7
munb <- 72
x <- rzinb(200, phi=phi, size=size, munb=munb)
#VGAM can fit using vglm... but I'd like to try optim
> fit <- vglm(x~1, zinegbinomial,trace=TRUE)
VGLM linear loop 1 : loglikelihood = -964.1915
VGLM linear loop 2 : loglikelihood = -964.1392
VGLM linear loop 3 : loglikelihood = -964.13...