Td-class                package:distr                R Documentation

_C_l_a_s_s "_T_d"

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

     The t distribution with 'df' = n degrees of freedom has density

 f(x) = Gamma((n+1)/2) / (sqrt(n pi) Gamma(n/2)) (1 + x^2/n)^-((n+1)/2)

     for all real x. It has mean 0 (for n > 1) and variance n/(n-2)
     (for n > 2). C.f. 'rt'

_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 'Td(df)'. This object
     is a t distribution.

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

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

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

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

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

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

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

_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 = "Td")': initialize method 

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

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

_N_o_t_e:

     The general _non-central_ t with parameters (df,Del) '= (df, ncp)'
     is defined as a the distribution of T(df,Del) := (U + Del) /
     (Chi(df) / sqrt(df))  where U and Chi(df)  are independent random
     variables, U ~ N(0,1), and Chi(df)^2 is chi-squared, see 'pchisq'.

     The most used applications are power calculations for t-tests:
      Let T= (mX - m0) / (S/sqrt(n)) where mX is the 'mean' and S the
     sample standard deviation ('sd') of X_1,X_2,...,X_n which are
     i.i.d. N(mu,sigma^2). Then T is distributed as non-centrally t
     with 'df'= n-1 degrees of freedom and *n*on-*c*entrality
     *p*arameter 'ncp'= (mu - m0) * sqrt(n)/sigma.

_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:

     'TParameter-class' 'AbscontDistribution-class' 'Reals-class' 'rt'

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

     T <- Td(df = 1) # T is a t distribution with df = 1.
     r(T)(1) # one random number generated from this distribution, e.g. -0.09697573
     d(T)(1) # Density of this distribution is 0.1591549 for x = 1.
     p(T)(1) # Probability that x < 1 is 0.75.
     q(T)(.1) # Probability that x < -3.077684 is 0.1.
     df(T) # df of this distribution is 1.
     df(T) <- 2 # df of this distribution is now 2.

