Chisq-class              package:distr              R Documentation

_C_l_a_s_s "_C_h_i_s_q"

_D_e_s_c_r_i_p_t_i_o_n:

     The chi-squared distribution with 'df'= n degrees of freedom has
     density

        f_n(x) = 1 / (2^(n/2) Gamma(n/2))  x^(n/2-1) e^(-x/2)

     for x > 0.  The mean and variance are n and 2n.

     The non-central chi-squared distribution with 'df'= n degrees of
     freedom and non-centrality parameter 'ncp' = lambda has density

 f(x) = exp(-lambda/2) SUM_{r=0}^infty ((lambda/2)^r / r!) dchisq(x, df + 2r)

     for x >= 0.  For integer n, this is the distribution of the sum of
     squares of n normals each with variance one, lambda being the sum
     of squares of the normal means.

     C.f. 'rchisq'

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 'Chisq(df, ncp)'. This
     object is a chi-squared distribution.

_S_l_o_t_s:

     '_i_m_g': Object of class '"Reals"': The space of the image of this
          distribution has got dimension 1 and the name "Real Space".

     '_p_a_r_a_m': Object of class '"ChisqParameter"': the parameter of this
          distribution (df and ncp), declared at its instantiation

     '_r': Object of class '"function"': generates random numbers (calls
          function rchisq)

     '_d': Object of class '"function"': density function (calls
          function dchisq)

     '_p': Object of class '"function"': cumulative function (calls
          function pchisq)

     '_q': Object of class '"function"': inverse of the cumulative
          function (calls function qchisq)

_E_x_t_e_n_d_s:

     Class '"AbscontDistribution"', directly. Class
     '"UnivariateDistribution"', by class '"AbscontDistribution"'.
     Class '"Distribution"', by class '"AbscontDistribution"'.

_M_e_t_h_o_d_s:

     _i_n_i_t_i_a_l_i_z_e 'signature(.Object = "Chisq")': initialize method 

     _d_f 'signature(object = "Chisq")': returns the slot df of the
          parameter of the distribution 

     _d_f<- 'signature(object = "Chisq")': modifies the slot df of the
          parameter of the distribution 

     _n_c_p 'signature(object = "Chisq")': returns the slot ncp of the
          parameter of the distribution 

     _n_c_p<- 'signature(object = "Chisq")': modifies the slot ncp of the
          parameter of the distribution 

_N_o_t_e:

     Warning: The code for pchisq and qchisq is unreliable for values
     of ncp above approximately 290.

_A_u_t_h_o_r(_s):

     Thomas Stabla Thomas.Stabla@uni-bayreuth.de,
      Florian Camphausen Florian.Camphausen@uni-bayreuth.de,
      Peter Ruckdeschel Peter.Ruckdeschel@uni-bayreuth.de,
      Matthias Kohl Matthias.Kohl@uni-bayreuth.de

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

     'ChisqParameter-class' 'AbscontDistribution-class' 'Reals-class'
     'rchisq'

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

     C <- Chisq(df = 1, ncp = 1) # C is a chi-squared distribution with df=1 and ncp=1.
     r(C)(1) # one random number generated from this distribution, e.g. 0.2557184
     d(C)(1) # Density of this distribution is 0.2264666 for x = 1.
     p(C)(1) # Probability that x < 1 is 0.4772499.
     q(C)(.1) # Probability that x < 0.04270125 is 0.1.
     df(C) # df of this distribution is 1.
     df(C) <- 2 # df of this distribution is now 2.

