Re: [R] Fitdistrplus and Custom Probability Density

2017-11-07 Thread David Winsemius
> On Nov 7, 2017, at 6:58 AM, Eric Berger wrote: > > Why not define your own functions based on d? > e.g. > myCumDist <- function(x) { integrate(d, lower=-Inf, upper=x)$value } > myQuantile <- function(x) { uniroot(f=function(y) { h(y) - x }, > interval=c(-5,5)) } # limits -5,5 should be repla

Re: [R] Fitdistrplus and Custom Probability Density

2017-11-07 Thread Eric Berger
Why not define your own functions based on d? e.g. myCumDist <- function(x) { integrate(d, lower=-Inf, upper=x)$value } myQuantile <- function(x) { uniroot(f=function(y) { h(y) - x }, interval=c(-5,5)) } # limits -5,5 should be replaced by your own which might require some fiddling e.g. d <- fun

[R] Fitdistrplus and Custom Probability Density

2017-11-07 Thread Lorenzo Isella
Dear All, Apologies for not providing a reproducible example, but if I could, then I would be able to answer myself my question. Essentially, I am trying to fit a very complicated custom probability distribution to some data. Fitdistrplus does in principle everything which I need, but if require me