cnonct: Non-centrality parameter for chi-square distribution
Description
Calculates the non-centrality parameter for a chi-square distribution for a given
quantile. This is often needed for sample size calculation for chi-square based tests.
Usage
cnonct(x, p, df)
Arguments
x
a numeric value at which the distribution was evaluated
p
a numeric value giving the cumulative probability at x
df
an integer giving the degrees of freedom of the chi-square variable
Details
The function is modeled after the SAS function CNONCT. If p is larger
than the cumulative probability of the central chi-square distribution at x, then
there is no solution and NA is returned.