Skip to content

Error when using fitdist function in R

7 messages · Paul Bernal, Brian Ripley, PIKAL Petr

#
Hi

where is function fitdist from? Do you by chance mean fitdistr from MASS package?
What is result of str(k)?

Without these questions answered you hardly get any useful answer.

Regards
Petr
#
On 10/04/2013 08:29, PIKAL Petr wrote:
No, from the output.  More likely

fitdistrplus::fitdist   Fit of univariate distributions to non-censored
                         data
Also, the data seem to be integers: a gamma distribution is for real 
positive values only.  Having zero values would give the results you see.

  
    
#
Dear PIKAL,

Thank you for your kind reply. The function fitdist comes from package
fitdistrplus. I am attaching a .csv document that contains the data I want
to fit a distribution to, so you can have a good idea of what kind of data
I am dealing with.

Basically what str(k) contains is the information that appears in the
column Toll in the .csv document I am attaching. I will also show you the
result of str(k), for your reference:

 int [1:499] 363328 376216 367032 314826 311892 313340 367106 227742 386744
372002 ...

Hope this helps explain my situation better,

Best regards,

Paul

2013/4/10 PIKAL Petr <petr.pikal at precheza.cz>
#
Dear Dr. Brian,

Hope you are doing well. The thing is that my data does not have any 0s in
it. Furthermore, I also tried fitting other distributions (i.e. weibull)
and still did not work.

I will show you the results of str(k) so you have an idea of the tipe of
data I am dealing with:

 int [1:499] 363328 376216 367032 314826 311892 313340 367106 227742 386744
372002 ...
I will also attach, the .csv file that contains the data I am working with,
for your reference.

Any help you can provide me with will be greatly appreciated,

Best regards and thanks for your kind reply,

Paul



2013/4/10 Prof Brian Ripley <ripley at stats.ox.ac.uk>