search for: loglikfun

Displaying 5 results from an estimated 5 matches for "loglikfun".

2003 Feb 01
1
Trouble with optim
...sited many points which are closer to optimal. I would be grateful for any explanation of this behaviour. I'm trying to estimate the parameters in the model X ~ Binomial(1,p) * NegBin(mu,theta). So I define a log likelihood function, and invoke optim thus: o <- optim (c(.7,10.3,8.5), fn=loglikfun, method="L-BFGS-B", lower=c(.001,.001,.001), upper=c(1,Inf,Inf)) The initial parameters are an educated guess. I made the loglikfun print out some information every time it's called. An (edited) output is like this: Eval fn at 0.7 10.3 8.5 --- Val = 42.70597 Eval fn at...
2011 Mar 12
3
betareg help
Dear R users, I'm trying to do betareg on my dataset. Dependent variable is not normally distributed and is proportion (of condom use (0,1)). But I'm having problems: gyl<-betareg(cond ~ alcoh + drug, data=results) Error in optim(par = start, fn = loglikfun, gr = gradfun, method = method, : initial value in 'vmmin' is not finite Why is R returning me error in optim()? What should I do? In advance, thank you for advice! -- ************************** Vlatka Matkovic Puljic +32/ 485/ 453340 [[alternative HTML version deleted]]
2007 Jul 26
1
zeroinfl() or zicounts() error
...es, 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 include "BuildingArea", I get this error: Error in optim(fn = loglikfun, par = c(start$count, start$zero, if (dist == : non-finite finite-difference value [2] I tried fitting the models using zicounts in the zicounts library as well and had the same difficulty. When I include "PopulationDensity", it runs, but outputs only the parameter estimates, not the...
2010 Mar 03
1
Zero inflated negative binomial
...where Year has 3 levels, Trt has 2 levels and Micro has 3 levels. However when I run it has a zero inflated negative binomial (as I have lots of zeros) I get the below error message: > Zinb <- zeroinfl(AvGUD ~ Year*Trt*Micro |1, data = AvGUD89, dist = "negbin") Error in optim(fn = loglikfun, gr = gradfun, par = c(start$count, start$zero, : non-finite value supplied by optim For what I have read I think the problem is that for Year level 3 there is no Trt 1 and for Year level 1 there is no Micro level 3. I cannot find a solution to this problem, is there any way I can solve this so...
2009 Nov 29
1
Convergence problem with zeroinfl() and hurdle() when interaction term added
...2 41 33 35 35 31 15 22 22 11 13 16 13 .... (truncated for brevity)... 285 286 287 288 289 290 291 292 293 294 <NA> 0 0 0 0 0 0 0 0 0 1 0 generating starting values...done calling optim() for ML estimation: Error in optim(fn = loglikfun, gr = gradfun, par = c(start$count, start$zero, : non-finite value supplied by optim In addition: Warning message: In glm.fit(Z, as.integer(Y0), weights = weights, family = binomial(link = linkstr)) : fitted probabilities numerically 0 or 1 occurred I get the same optim error when I run a si...