> On Mar 21, 2017, at 5:04 AM, Michael Dayan <mdayan.resea...@gmail.com> wrote: > > Hi, > > I would like to fit a mixture of two beta distributions with parameters > (alpha1, beta1) for the first component, (alpha2, beta2) for the second > component, and lambda for the mixing parameter. I also would like to set a > maximum of 200 iterations and a tolerance of 1e-08. > > My question is: how to use the betareg package to run the fit with initial > values for the parameters alpha1, beta1, alpha2, beta2 and lambda? I saw in > the documentation that I would need to use the 'start' option of the > betareg function, with start described as "an optional vector with starting > values for all parameters (including phi)". However I could not find how to > define this list given my alpha1, beta1, alpha2, beta2 and lambda. > > The current code I have is: > mydata$y <- <my_data> > bmix <- betamix(y ~ 1 | 1, data = mydata, k = 2, fstol = 1e-08, maxit = > 200, fsmaxit = 200) > > > And I suspect I would need to do something along the lines: > > initial.vals <- c(?, ?, ?, ?, ?) > bmix <- betamix(y ~ 1 | 1, data = mydata, k = 2, fstol = 1e-08, maxit = > 200, fsmaxit = 200, control=betareg.control(start=initial.vals))) > > But I do not know what to use for initial.vals.
If there were sensitivity to data, then wouldn't that depend on your (unprovided) data? > > Best wishes, > > Michael > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. David Winsemius Alameda, CA, USA ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.