Skip to content
Prev 8816 / 398502 Next

quantile function for noncentral f-distribution

On Tue, 9 Jan 2001, Juergen Hedderich wrote:

            
Since pf has a non-centrality parameter, you can easily invert it.

myqf <- function(p, df1, df2, ncp)
{
uniroot(function(x) pf(x, df1, df2, ncp) - p, , 0, 100)$root
}

adjust 100 to suit (one can surely come up with an useful computed upper
bound if ncp might be large), and add a tol arg to uniroot if you care.