

FDist {base}                                 R Documentation

_T_h_e _F _D_i_s_t_r_i_b_u_t_i_o_n

_U_s_a_g_e_:

     df(x, df1, df2)
     pf(q, df1, df2, ncp=0)
     qf(p, df1, df2)
     rf(n, df1, df2)

_A_r_g_u_m_e_n_t_s_:

     x,q: vector of quantiles.

       p: vector of probabilities.

       n: number of observations to generate.

 df1,df2: degrees of freedom.

     ncp: non-centrality parameter.

_V_a_l_u_e_:

     These functions provide information about the F distri-
     bution with `df1' and `df2' degrees of freedom (and
     optional non-centrality parameter `ncp').  `df' gives
     the density, `pf' gives the distribution function `qf'
     gives the quantile function and `rf' generates random
     deviates.

     The F distribution with `df1 =' n1 and `df2 =' n2
     degrees of freedom has density

      f(x) = Gamma((n1 + n2)/2) / (Gamma(n1/2) Gamma(n2/2))
      (n1/n2)^(n1/2) x^(n1/2 - 1)
      (1 + (n1/n2) x)^-(n1 + n2)/2

     for x > 0.

_S_e_e _A_l_s_o_:

     `dt' for Student's t distribution, the square of which
     is (almost) equivalent to the F distribution with `df2'
     = 1.

_E_x_a_m_p_l_e_s_:

     df(1,1,1) == dt(1,1)# TRUE

     ## Identity:  qf(2*p -1, 1, df)) == qt(p, df)^2)  for  p >= 1/2
     p <- seq(1/2, .99, length=50); df <- 10
     rel.err <- function(x,y) ifelse(x==y,0, abs(x-y)/mean(abs(c(x,y))))
     quantile(rel.err(qf(2*p -1, df1=1, df2=df), qt(p, df)^2), .90)# ~= 7e-9

