Page 1 of 1

inverse quantile function

Posted: Wed Jan 21, 2009 2:35 pm
by startz
How about an inverse quantile function, the inverse of @quantile?

Re: inverse quantile function

Posted: Wed Jan 21, 2009 2:42 pm
by EViews Gareth
What would it do?

Am I missing something or isn't that just a rank function (i.e. the @ranks function)

Re: inverse quantile function

Posted: Wed Jan 21, 2009 3:00 pm
by startz
What would it do?

Am I missing something or isn't that just a rank function (i.e. the @ranks function)
So that's what the @ranks function does!

Actually, I think the asnswer is "not quite." You would need @ranks()/@nobs.

More to the point, @quantile returns a single value, which is what I was looking for in an "inverse quantile" function. I wanted to know what quantile was associated with the number 72.6, which might not even be in the dataset.

Re: inverse quantile function

Posted: Wed Jan 21, 2009 3:18 pm
by EViews Gareth
Something like:

Code: Select all

series dd=x>=72.6 scalar invquant = @sum(dd)/@nobs

Re: inverse quantile function

Posted: Wed Jan 21, 2009 3:29 pm
by startz
Something like:

Code: Select all

series dd=x>=72.6 scalar invquant = @sum(dd)/@nobs
Well yes. Perhaps version 8 could have a function that did this so us slower types wouldn't need help figuring it out. Even better, a function where the cut point could be general, instead of being hard coded at 72.6 :wink:

Re: inverse quantile function

Posted: Wed Jan 21, 2009 4:12 pm
by EViews Gareth
We're a little far off from thinking about version 8 at the moment...