Skip to content

fitting data

2 messages · Serebrenik, A., Ben Bolker

#
Serebrenik, A. <a.serebrenik <at> tue.nl> writes:
That might be a decent starting value.
The help for fitdistr says that "densfun" may be ...
" a function returning a density evaluated at its first argument".
In case that's opaque to you, that means something like

dmyfun <- function(x,lambda) {
  (1-exp(-lambda))/lambda*exp(-lambda*x)
}

fitdistr(mydata,dmyfun,start)


 [note: totally untested ...]

  Ben Bolker