dchisq(x, df, log=F) pchisq(q, df, ncp=0) qchisq(p, df) rchisq(n, df, bigdata=F)
bdVector
of quantiles.
Missing values (
NA
s) are allowed.
bdVector
of (positive) quantiles.
Missing values (
NA
s) are allowed.
bdVector
of probabilities.
Missing values (
NA
s) are allowed.
length(n)
is larger than 1, then
length(n)
random values are returned.
p
or
q
or the number of
deviates generated.
Non-integer values are allowed, but missing values are not.
bdVector
of non-negative numbers giving the noncentrality parameter.
TRUE
, an object of type
bdVector
is returned.
Otherwise, a
vector
object is returned. This argument can be used only if the bigdata library section has been loaded.
TRUE
,
dchisq
will return
the log of the density, not the density itself.
dchisq
),
probability (
pchisq
),
quantile (
qchisq
), or
random sample (
rchisq
)
for the chi-square distribution with
df
degrees of freedom.
rchisq
causes creation of the dataset
.Random.seed
if it does
not already exist, otherwise its value is updated.
Elements of
q
or
p
that are missing will cause the corresponding elements of the result to be missing.
Assume that the noncentral chisquare is the sum of
df
independent
Gaussian random variables, then the noncentrality parameter is equal
to the sum of the squared means of the Gaussian variables.
See Posten (1989) for a description of the computing algorithm for
noncentrality in
pf
.
The chi-square distribution takes on positive real values. A specialization
of the gamma distribution (see
Gamma
), it is important because many
quadratic forms follow the chi-square distribution under the assumption that
the data follow the Gaussian (normal) distribution. In particular the
sample variance is a scaled chi-square variable.
Likelihood ratio statistics are also approximately distributed as a chi-square.
For details on the uniform random number generator implemented in S-PLUS,
see the
set.seed
help file.
Johnson, N. L. and Kotz, S. (1970).
Continuous Univariate Distributions, vol. 2.
Houghton-Mifflin, Boston.
Posten, H. O. (1989). An effective algorithm for the noncentral chi-squared
distribution function.
The American Statistician
43 261-263.
1-pchisq(stat,df) # p-value for stat # power of a test for several noncentrality values 1 - pchisq(qchisq(.95, 8), 8, 0:10)