Vlatka Matkovic Puljic <v.matkovic.puljic <at> gmail.com> writes:
> > Maybe I should include data: > > results$cond > [1] 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 [snip] > [205] 0.950 0.960 0.980 0.980 0.999 > > 2011/3/12 Vlatka Matkovic Puljic <v.matkovic.puljic <at> gmail.com> > > > 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? > > My first guess would have been that you had zeros and ones in your data, but you seem to have taken care of that. Are you willing to post the whole data set (use dput() to get it in a useful form)? Ben Bolker ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.