I fitted a empirical distribution to a set of time series data (Y) by following code in R:
Ye=rank(Y)/(length(Y)+1)
How we can find the inverse of this distribution? Thanks
I fitted a empirical distribution to a set of time series data (Y) by following code in R:
Ye=rank(Y)/(length(Y)+1)
How we can find the inverse of this distribution? Thanks
Basically answered in comments, recollected here:
An ECDF has right inverses but no left inverses; sometimes the former is good enough when an inverse is needed. (A function has a right inverse when (())= for all in the image of .) The right inverse can be found with a binary search or its equivalent. I cannot tell from the information given so far whether a right inverse would be suitable in this situation. – whuber
ecdffunction. 2) The function doesn't have an actual inverse. What did you need it for? Random sampling?sample) – Glen_b Feb 25 '14 at 21:46samplewithreplace=TRUE(of course). – Glen_b Feb 27 '14 at 02:07