[R] fitdistr()

2007-09-09 Thread Terence Broderick
I am trying to fit the chi-squared distribution to a set of data using the fitdistr function found in the MASS4 library, the data set is called ONES3, I have loaded it using the command ONES3-read.table(ONES3.pdf,header=TRUE,na=NA) I print out the dataset ONES3 to the screen to make

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

[R] Fitdistr() versus nls()

2006-09-23 Thread Luca Telloli
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 calculate manually the CDF, and then 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

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

2006-02-10 Thread Gregor Gorjanc
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) sds - sqrt(estimate/n) Is this MLE? With

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

[R] Fitdistr()

2005-11-17 Thread Mark Miller
When using fitdistr() with the exponential, log-normal and beta distributions, you get the relevent rate, mean, standard deviation, shape1 and shape2 but you get a number bellow those that are in () and I was wandering what exactly those numbers represent and how they relate to the data. Many

Re: [R] Fitdistr()

2005-11-17 Thread Vito Ricci
(0.89052006) (0.01948648) ^^^ ^^^ From: Mark Miller mmiller at nassp.uct.ac.za Subject: [R] Fitdistr() Newsgroups: gmane.comp.lang.r.general Date: 2005-11-17 07:58:10 GMT (4 hours and 2 minutes ago) When using fitdistr() with the exponential, log-normal and beta distributions, you get

[R] 'fitdistr' and two views of the same data?

2005-05-18 Thread Matt Jadud
Hello, I have detailed (with pictures and whatnot) my question on my weblog at http://www.cs-ed.org/blogs/mjadud/archives/2005/05/a_question_abou.html The short version of the question is this: When I ask 'fitdistr' to try and fit my distribution as a weibull distribution, it comes up with

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

[R] Fitdistr and likelihood

2005-04-05 Thread Carsten Steinhoff
Hi all, I'm using the function fitdistr (library MASS) to fit a distribution to given data. What I have to do further, is getting the log-Likelihood-Value from this estimation. Is there any simple possibility to realize it? Regards, Carsten __

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

[R] fitdistr, mle's and gamma distribution

2003-09-30 Thread Lourens Olivier Walters
Dear R Users, I am trying to obtain a best-fit analytic distribution for a dataset with 11535459 entries. The data range in value from 1 to 3. I use: fitdistr(data, gamma) to obtain mle's for the parameters. I get the following error: Error in optim(start, mylogfn, x = x, hessian =

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