gkf:
Numerical solution for an equation involving noncentral T cdf
Description
It provides the solution of the equation $F_t(q;df,x)=p$, where $F_t$ is the cdf (calculated in q) of a non-central Student r.v. with df degrees of freedom and unkwon noncentrality parameter x. In R code, gkf provides the solution of pt(q,df,x)=p.
Usage
gkf(p, q, df, eps = 1e-05)
Arguments
p
a probability
q
a real value
df
degrees of freedom of noncentral T
eps
tolerance
Value
the noncentrality parameter $x$ satisfying the equation $F_t(q;df,x)=p$
Details
This function is used for building Guo-Krishnamoorthy confidence intervals for R
References
Guo H, Krishnamoorthy K (2004) New approximate inferential methods for the reliability parameter
in a stress-strength model: The normal case. Commun Stat Theory Methods 33:1715-1731
p<-0.95q<-5df<-12ncp<-gkf(p, q, df)
ncp
# check if the result is correctpt(q, df, ncp)
# OK# changing the tolerancencp<-gkf(p, q, df, eps=1e-10)
ncp
pt(q, df, ncp)