# Distribution Fitting with R

5 messages
Open this post in threaded view
|

## Distribution Fitting with R

 Hello everyone, Basically, I want to perform some distribution fitting analysis to a particular data that I have. So the data I will be working with is structured as follows: *Vessel Size*                           *   Number of Vessels*          *Frequency* 1000-2000 TEUS                                           1000                       1% 2000-3000 TEUS                                           3000                     15% 3000-4000 TEUS                                           2750                     10% 4000-5000 TEUS                                           5700                     30% The field Vessel Size is a categorical one, specifying what is the vessel size category, then the field Number of Vessels tells me how many vessels are in each one of those vessel size categories and frequency is just the percentage of the total (this is just an example). How can I perform a distribution fit for this data? The reason why I want to fit a distribution is to then perform a Monte Carlo Simulation with the data. Any help will be greatly appreciated, Best regards, Paul         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: Distribution Fitting with R

 Just sample with replacement from your empirical distribution? See: ?sample ## note the "replace" argument Other than that, I do not understand what you mean by "distribution fitting analysis." Cheers, Bert On Mon, Aug 5, 2013 at 10:55 AM, Paul Bernal <[hidden email]> wrote: > Hello everyone, > > Basically, I want to perform some distribution fitting analysis to a > particular data that I have. > > So the data I will be working with is structured as follows: > > *Vessel Size*                           *   Number of Vessels* >          *Frequency* > > 1000-2000 TEUS                                           1000 >                       1% > 2000-3000 TEUS                                           3000 >                     15% > 3000-4000 TEUS                                           2750 >                     10% > 4000-5000 TEUS                                           5700 >                     30% > > > The field Vessel Size is a categorical one, specifying what is the vessel > size category, then the field Number of Vessels tells me how many vessels > are in each one of those vessel size categories and frequency is just the > percentage of the total (this is just an example). > > How can I perform a distribution fit for this data? The reason why I want > to fit a distribution is to then perform a Monte Carlo Simulation with the > data. > > Any help will be greatly appreciated, > > Best regards, > > Paul > >         [[alternative HTML version deleted]] > > ______________________________________________ > [hidden email] 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. -- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: Distribution Fitting with R

 Hello Bert, Thank you for your comments. I want to actually fit a formal statistical distribution to my data using the classical methodologies (either Shapiro Wilk, Anderson Darling, Chi-Square, etc.). Once I have fitted a distribution then I will start generating random numbers and performing the Monte Carlo Simulation. That is the reason why!! Best regards, Paul 2013/8/5 Bert Gunter <[hidden email]> > Just sample with replacement from your empirical distribution? See: > > ?sample ## note the "replace" argument > > Other than that, I do not understand what you mean by "distribution > fitting analysis." > > Cheers, > Bert > > On Mon, Aug 5, 2013 at 10:55 AM, Paul Bernal <[hidden email]> > wrote: > > Hello everyone, > > > > Basically, I want to perform some distribution fitting analysis to a > > particular data that I have. > > > > So the data I will be working with is structured as follows: > > > > *Vessel Size*                           *   Number of Vessels* > >          *Frequency* > > > > 1000-2000 TEUS                                           1000 > >                       1% > > 2000-3000 TEUS                                           3000 > >                     15% > > 3000-4000 TEUS                                           2750 > >                     10% > > 4000-5000 TEUS                                           5700 > >                     30% > > > > > > The field Vessel Size is a categorical one, specifying what is the vessel > > size category, then the field Number of Vessels tells me how many vessels > > are in each one of those vessel size categories and frequency is just the > > percentage of the total (this is just an example). > > > > How can I perform a distribution fit for this data? The reason why I want > > to fit a distribution is to then perform a Monte Carlo Simulation with > the > > data. > > > > Any help will be greatly appreciated, > > > > Best regards, > > > > Paul > > > >         [[alternative HTML version deleted]] > > > > ______________________________________________ > > [hidden email] 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. > > > > -- > > Bert Gunter > Genentech Nonclinical Biostatistics > > Internal Contact Info: > Phone: 467-7374 > Website: > > http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm>         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.