Thank you for your response. I saw already that example and some others too. However, they defined alpha and beta in the examples or use two different dataset. I did not know alpha and beta values and have only one data set. I could calculate alpha and beta by using variance and means for the data has one peaks. How can I calculate alpha and beta for two peak distributions? Thanks> On Dec 28, 2015, at 6:21 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote: > >> On 29/12/15 08:40, mesude bayrakci wrote: >> Hello, >> >> I have data; one column and 310 rows. When I plot the histogram, it has two >> peaks; please see the attachment. I would like to find appropriate >> distribution that fits the data. I tried to mixtools in R, but it did not >> fit well. >> >> I want to mix two beta distribution. I found that there is betareg package >> in R but the shape1,shape2 were known or there were two different data in >> the all examples. >> >> I do not know where to start. How can I use betamix in R to fit the data? >> Any hint? >> >> I really appreciate. >> >> >> Thank you > > > GIYF > > Searching on "beta mixture model in r" leads to a number of hits, the most relevant one (it seems to me) being: > > r - Mixture of beta distributions: full example - Cross Validated > > which leads to > > http://stats.stackexchange.com/questions/114959/mixture-of-beta-distributions-full-example > > A fully worked example is provided. > > cheers, > > Rolf Turner > > -- > Technical Editor ANZJS > Department of Statistics > University of Auckland > Phone: +64-9-373-7599 ext. 88276
On 29/12/15 12:30, mesude bayrakci wrote:> Thank you for your response. I saw already that example and some > others too. However, they defined alpha and beta in the examples or > use two different dataset. I did not know alpha and beta values and > have only one data set. I could calculate alpha and beta by using > variance and means for the data has one peaks. > > How can I calculate alpha and beta for two peak distributions?Given your level of obtuseness I think that the advancement of science would be best served if you were not encouraged to pursue this line of endeavour any further. Be that as it may: *NO*, "they" did not define alpha and beta in the example (singular). They *simulated* a data set using known values of alpha and beta, and then fitted a beta mixture model to the simulated data, obtaining fitted values of the alphas and betas that were satisfyingly close to the "true" values from which the data were simulated. cheers, Rolf Turner -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276
Hello, "Treat everyone with politeness, even those who are rude to you - not because they are nice, but because you are" The forum's name is "R-help", not "R-help for people who are experts in statistic and R". Please if you would like to help and just help. If you do not like the posts (or questions), you simply do not answer. On Mon, Dec 28, 2015 at 6:39 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote:> On 29/12/15 12:30, mesude bayrakci wrote: > >> Thank you for your response. I saw already that example and some >> others too. However, they defined alpha and beta in the examples or >> use two different dataset. I did not know alpha and beta values and >> have only one data set. I could calculate alpha and beta by using >> variance and means for the data has one peaks. >> >> How can I calculate alpha and beta for two peak distributions? >> > > > Given your level of obtuseness I think that the advancement of science > would be best served if you were not encouraged to pursue this line of > endeavour any further. > > Be that as it may: *NO*, "they" did not define alpha and beta in the > example (singular). They *simulated* a data set using known values of > alpha and beta, and then fitted a beta mixture model to the simulated data, > obtaining fitted values of the alphas and betas that were satisfyingly > close to the "true" values from which the data were simulated. > > > cheers, > > Rolf Turner > > -- > Technical Editor ANZJS > Department of Statistics > University of Auckland > Phone: +64-9-373-7599 ext. 88276 >[[alternative HTML version deleted]]