[R] Error in optim while using fitdistr() function for estimation of parameters

From: Aswad Gurjar <aswadgurjar_at_gmail.com>
Date: Sun, 10 Feb 2008 11:46:42 +0530


  Hello,

I am trying to fit distribution for data consisting of 421 readings.It is basically no of requests arrived per minute.It contains many 0 entries as no of requests.When i use
fd<-fitdistr(V2,"gamma")
I get following error:
Error in optim(x = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, :

        initial value in 'vmmin' is not finite

What should I do ? I need this function because I want to get value of estimated parameters.
Is there any other function to perform such calculations? Please help me.
Thank You.

Code is as follows:
x<-data.frame()
N<-data.frame((read.table("cs2ip.txt"))) attach(N)
library(MASS)
fd<-fitdistr(V2,"gamma")

Aswad

        [[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 Sun 10 Feb 2008 - 06:21:36 GMT

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 Sun 10 Feb 2008 - 07:30:12 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