elena daniela concepcion
2010-Feb-01 09:16 UTC
[R] Help with multiple poisson regression with MLE2
Hi, I'm trying to make multiple poisson regressions with the MLE2 command. I have used the following expression, but I receive an error message: poisfit <- mle2(y ~ dpois(exp(b0 + b1*x1 + b2*x2)), start=list(b0=1, b1=1, b2=1), data=data1) Error in optim(par = c(1, 1, 1), fn = function (p) : non-finite initial value 'vmmin' I have changed initial values using coefficient values given by the GLM standard procedure but it still doesn't work. Do someone knows where is the problem? Many thanks in advance, Elena [[alternative HTML version deleted]]
elena daniela concepcion <elenadconcepcion <at> gmail.com> writes:> > Hi, I'm trying to make multiple poisson regressions with the MLE2 command. > I have used the following expression, but I receive an error message: > > poisfit <- mle2(y ~ dpois(exp(b0 + b1*x1 + b2*x2)), start=list(b0=1, b1=1, > b2=1), data=data1) > Error in optim(par = c(1, 1, 1), fn = function (p) : > non-finite initial value 'vmmin' > > I have changed initial values using coefficient values given by the GLM > standard procedure but it still doesn't work. > Do someone knows where is the problem? >There's nothing obviously wrong here. A reproducible example would be very helpful ... this *should* give the same result as glm(y~x1+x2,family=poisson,data=data1) ... What is with(data1,range(exp(b0+b1*x1+b2*x2))) ?