Re: [R] How to fit a random data into Beta distribution?

From: Ali Akbar Bromideh <bromideh_at_hotmail.com>
Date: Wed, 04 May 2011 10:01:36 +0000

Dear Shekar,
For me I had such a problem, when I repeated with many dist. So, I drafted my own procedure for example for Weibull, Gamma and Log-Normal without any warnings. But you can ignore the Warning, since the result was somehow the same for my case. Regards,
Ali

> Date: Wed, 4 May 2011 19:46:54 +1000
> From: stevenkennedy2263_at_gmail.com
> To: shekhar2581_at_gmail.com
> CC: r-help@r-project.org
> Subject: Re: [R] How to fit a random data into Beta distribution?
>
> Hi Shekhar,
>
> It looks from your error that you have values outside the range 0 to
> 1. The beta distribution is only defined between 0 and 1. Can you
> please post your data set (or at least a portion of it)?
>
>
>
>
> On Wed, May 4, 2011 at 3:24 PM, Shekhar <shekhar2581_at_gmail.com> wrote:
> > Hi Steven,
> > Thanks for the quick reply. i have tried but
> > its giving me error--->Error in optim(x = c(38.1815173696765,
> > -12.7988197976440, -3.88212459045077, :
> > initial value in 'vmmin' is not finite
> >
> >
> > i have tried something like this:

> >
> > library(MASS)
> > x<-rnorm(n=100,mean=10,sd=20);
> > fitdistr(x,dbeta,start=list(shape1=1,shape2=1)
> >
> > Please correct me if my understanding is wrong:
> > In the fitdistr fucntion we are providing the initial values of the
> > Beta distribution parameters as shape1=1 and shape2=1. This function
> > will try to fit the data and give us the new parameters of Beta
> > distribution that approximately fits this data.
> >
> >
> > I have tried the function with other distribution like Normal, Gamma,
> > Weibull...its working fine..
> >
> > Regards,
> > Som Shekhar
> >
> >
> >
> >
> > On May 4, 1:25 am, Steven Kennedy <stevenkennedy2..._at_gmail.com> wrote:
> >> library(MASS)
> >> fitdistr(x,"beta",list(shape1=1,shape2=1))
> >>
> >>
> >>
> >> On Tue, May 3, 2011 at 9:44 PM, Shekhar <shekhar2..._at_gmail.com> wrote:
> >>
> >> > Hi,
> >> > I have some random data and i want to find out the parameters of Beta
> >> > distribution ( a and b) such that this data approximately fits into
> >> > this distribution. I have tried by plot the histograms and graph, but
> >> > it requires lot of tuning and i am unable to do that. can anyone tell
> >> > me how to do it programmitically in R?
> >>
> >> > Regards,
> >> > Som Shekhar
> >>
> >> > ______________________________________________
> >> > R-h..._at_r-project.org mailing list
> >> >
https://stat.ethz.ch/mailman/listinfo/r-help
> >> > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> >> > and provide commented, minimal, self-contained, reproducible code.
> >>
> >> ______________________________________________
> >> R-h...@r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> >> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> >> and provide commented, minimal, self-contained, reproducible code.
> >
> > ______________________________________________
> > R-help_at_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.
> >
>
> ______________________________________________
> R-help_at_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.
                                               

        [[alternative HTML version deleted]]



R-help_at_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. Received on Thu 05 May 2011 - 06:25:03 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 19 May 2011 - 21:30:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive