Learn R Programming

DMAR (version 1.0.0)

moments_nc_F: Moments of the Noncentral F Distribution

Description

Returns the mean, variance, standard deviation, skewness, and excess kurtosis of a noncentral F distribution with df_1 numerator and df_2 denominator degrees of freedom and noncentrality parameter ncp. The noncentral F is the reference distribution of the F statistic when an effect is present, so its moments describe the sampling behavior of \(R^2\), eta squared, and the omnibus F test under the alternative. A central F (ncp = 0) is the special case. The function was moments_ncf() in earlier builds of DMAR.

Usage

moments_nc_F(df_1, df_2, ncp = 0)

Value

A data.frame (class dmar_tbl) in

term / value layout with the mean, variance,

sd, skewness, and excess_kurtosis (any of which may be

NA when df_2 is too small), followed by the df_1,

df_2, and ncp that produced them.

Arguments

df_1

Numerator degrees of freedom, a single positive number.

df_2

Denominator degrees of freedom, a single positive number.

ncp

Noncentrality parameter \(\lambda\), a single non-negative number. Defaults to 0, the central F.

Author

Ken Kelley [email protected]

Details

Writing the noncentral F as \(F = (X_1/\nu_1)/(X_2/\nu_2)\) with \(X_1 \sim \chi^2_{\nu_1}(\lambda)\) a noncentral chi square and \(X_2 \sim \chi^2_{\nu_2}\) independent, the raw moments are $$\mathrm{E}[F^k] = \Bigl(\tfrac{\nu_2}{\nu_1}\Bigr)^k \mathrm{E}[X_1^k]\, \prod_{i=1}^{k}\frac{1}{\nu_2 - 2i}, \qquad \nu_2 > 2k,$$ where the noncentral chi square moments \(\mathrm{E}[X_1^k]\) follow from its cumulants \(\kappa_n = 2^{n-1}(n-1)!\,(\nu_1 + n\lambda)\). The mean exists for \(\nu_2 > 2\), the variance for \(\nu_2 > 4\), the skewness for \(\nu_2 > 6\), and the excess kurtosis for \(\nu_2 > 8\); a moment whose denominator degrees of freedom condition is not met is returned as NA. The mean reduces to the familiar \(\nu_2(\nu_1 + \lambda)/[\nu_1(\nu_2 - 2)]\), and the variance to \(2(\nu_2/\nu_1)^2[(\nu_1 + \lambda)^2 + (\nu_1 + 2\lambda)(\nu_2 - 2)] / [(\nu_2 - 2)^2(\nu_2 - 4)]\).

References

Johnson, N. L., Kotz, S., & Balakrishnan, N. (1995). Continuous univariate distributions (Vol. 2, 2nd ed., Chapter 30). Wiley.

See Also

moments_nc_t for the noncentral t; ci_nc_F for the noncentral F confidence limits used in effect size intervals; df for the density.

Other noncentral distribution moments: moments_nc_chisq(), moments_nc_t()

Examples

Run this code
# A noncentral F with 3 and 40 df and noncentrality 8.
moments_nc_F(df_1 = 3, df_2 = 40, ncp = 8)

# ncp = 0 is the central F: mean df_2 / (df_2 - 2).
moments_nc_F(df_1 = 3, df_2 = 40)

# The variance is undefined for four or fewer denominator df.
moments_nc_F(df_1 = 2, df_2 = 4, ncp = 5)

Run the code above in your browser using DataLab