On Jul 16, 2011, at 14:17 , Jochen1980 wrote:

> Hi,
> 
> I am using ecdf-function and want to use the ecdf()-data-points for nls() as
> data-parameter.
> nls() expects 'list' or 'environment' as a data-type, knots(ecdf(mydata))
> gives me 'numeric'.
> What should I do now?

Consider using fitdistr() from the MASS package. What you're trying to do is 
just wrong!

> 
> Thanks in advance - Jochen
> 
> Here is the code:
> #################################################
> # --- Fit ---
> # Gumbel-Dist-Function, cumulative,
> http://en.wikipedia.org/wiki/Gumbel_distribution
> #               ( - ( x - mue ) / beta )
> #          ( -e )^
> # F(x) = e^
> # formula for fitting-function
> # formula: y ~ I( exp(1) ^ ( - exp(1) ) ^ ( - ( x - mue ) / beta ) )

Ouch!!!!

Do teach yourself what exp() means. I believe that wants to be

exp( - exp( - ( x - mue ) / beta ) )


notice that fitdistr() needs the density, though. I.e. the derivative of the 
above with respect to x.


-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd....@cbs.dk  Priv: pda...@gmail.com

______________________________________________
R-help@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.

Reply via email to