Re: [R] fitdistr()

2007-09-09 Thread jim holtman
I assume that you want to do the fitdistr on one of the columns of the dataframe that you have read in. What does 'str(ONES3)' show? If the data is in the first column, try: fitdistr(ONES3[[1]],chi-squared) On 9/9/07, Terence Broderick [EMAIL PROTECTED] wrote: I am trying to fit the

Re: [R] Fitdistr() versus nls()

2006-09-24 Thread Prof Brian Ripley
On Sat, 23 Sep 2006, Luca Telloli wrote: Hello R-Users, I'm new to R so I apologize in advance for any big mistake I might be doing. I'm trying to fit a set of samples with some probabilistic curve, and I have an important question to ask; in particular I have some data, from which I

Re: [R] Fitdistr and MLE for parameter lambda of Poisson distribution

2006-02-14 Thread Bernardo Rangel tura
At 09:35 AM 2/10/2006, Gregor Gorjanc wrote: Hello! I would like to get MLE for parameter lambda of Poisson distribution. I can use fitdistr() for this. After looking a bit into the code of this function I can see that value for lambda and its standard error is estimated via estimate - mean(x)

Re: [R] Fitdistr and MLE for parameter lambda of Poisson distribution

2006-02-14 Thread Gregor Gorjanc
Bernardo Rangel tura wrote: At 09:35 AM 2/10/2006, Gregor Gorjanc wrote: Hello! I would like to get MLE for parameter lambda of Poisson distribution. I can use fitdistr() for this. After looking a bit into the code of this function I can see that value for lambda and its standard error is

Re: [R] Fitdistr and MLE for parameter lambda of Poisson distribution

2006-02-10 Thread Peter Dalgaard
Gregor Gorjanc [EMAIL PROTECTED] writes: Hello! I would like to get MLE for parameter lambda of Poisson distribution. I can use fitdistr() for this. After looking a bit into the code of this function I can see that value for lambda and its standard error is estimated via estimate -

Re: [R] Fitdistr and MLE for parameter lambda of Poisson distribution

2006-02-10 Thread Gregor Gorjanc
Peter Dalgaard wrote: Gregor Gorjanc [EMAIL PROTECTED] writes: Hello! I would like to get MLE for parameter lambda of Poisson distribution. I can use fitdistr() for this. After looking a bit into the code of this function I can see that value for lambda and its standard error is estimated

Re: [R] Fitdistr()

2005-11-17 Thread Vito Ricci
Hi, values in parentesis below the estimate of a parameter is the standard deviation of parameter, that's a measure of variability. Regards. Vito set.seed(123) x - rgamma(100, shape = 5, rate = 0.1) fitdistr(x, gamma) shape rate 6.45947303 0.13593172

Re: [R] Fitdistr and likelihood

2005-04-06 Thread Martin Maechler
{BCC'ed to VR's maintainer} Carsten == Carsten Steinhoff [EMAIL PROTECTED] on Tue, 5 Apr 2005 17:31:04 +0200 writes: Carsten Hi all, I'm using the function fitdistr (library Carsten MASS) to fit a distribution to given data. What I Carsten have to do further, is getting

Re: [R] fitdistr, mle's and gamma distribution

2003-10-08 Thread Lourens Olivier Walters
Thanks, your advice worked. I don't have much experience with maths, and therefore tried to stay away from dealing with optimization, but going down to this level opens a lot of possibilities. For the record, the code I used, as you suggested: ### shape - mean(data)^2/var(data) scale

Re: [R] fitdistr, mle's and gamma distribution

2003-10-08 Thread Spencer Graves
I'm sorry, but I don't have time to read all your code. However, I saw that you tested for x alpha in your Pareto distribution example. Have you considered reparameterizing to estimate log.del = log(alpha-min(x))? Pass log.del as part of the vector of parameters to estimate, then

Re: [R] fitdistr, mle's and gamma distribution

2003-10-08 Thread Lourens Olivier Walters
Thanks for the help, the wrapper function was very useful. I managed to solve the problem using Spencer Graves' suggestion. I am analyzing the interarrival times between HTTP packets on a campus network. The dataset actually has more than 14 Million entries! It represents the traffic generated by

Re: [R] fitdistr, mle's and gamma distribution

2003-10-08 Thread Spencer Graves
Are you interested in turning that into a monitor, processing each day's data sequentially or even each entry as it arrived? If yes, you may wish to evaluate the Foundations of Monitoring documents downloadable from www.prodsyse.com. If you have any questions about that, I might be able

Re: [R] fitdistr, mle's and gamma distribution

2003-09-30 Thread Spencer Graves
In my experience, the most likely cause of this problem is that optim may try to test nonpositive values for shape or scale. I avoid this situation by programming the log(likelihood) in terms of log(shape) and log(scale) as follows: gammaLoglik - + function(x, logShape, logScale,

Re: [R] fitdistr, mle's and gamma distribution

2003-09-30 Thread Ben Bolker
Spencer Graves's suggestion of using shape and scale parameters on a log scale is a good one. To do specifically what you want (check values for which the objective function is called and see what happens) you can do the following (untested!), which makes a local copy of dgamma that you

Re: [R] fitdistr, mle's and gamma distribution

2003-09-30 Thread Ben Bolker
PS. 11 MILLION entries?? On Tue, 30 Sep 2003, Ben Bolker wrote: Spencer Graves's suggestion of using shape and scale parameters on a log scale is a good one. To do specifically what you want (check values for which the objective function is called and see what happens) you can