HypothesisTesting          package:fBasics          R Documentation

_T_e_s_t_s _C_l_a_s_s _R_e_p_r_e_s_e_n_t_a_t_i_o_n _a_n_d _U_t_i_l_i_t_i_e_s

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

     Class representation, methods and utility  functions for objects
     of class 'fHTEST'. 

     The class representation and methods are:

       'fHTEST'  Representation for an S4 object of class "fHTEST",
       'show'    S4 print method.

     Utility Functions:

       'pPlot'   General finite sample probability plot,
       'pTable'  interpolated probabilities from finite sample table,
       'qTable'  interpolated quantiles from finite sample table.

_U_s_a_g_e:

     show.fHTEST(object)

     pPlot(X, nN = 100, nStat = 100, logN = TRUE, logStat = FALSE, 
         fill = FALSE, linear = TRUE, digits = 8, doplot = TRUE, ...)
     pTable(X, Stat, N, digits = 4)
     qTable(X, p, N, digits = 4)

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

  digits: an integer value with the number of rounding digits. 

  doplot: a logical flag. Should a plot be displayed? 

    fill: [pPlot] - 
           a logical flag deciding if missing data should be filled
          with asymptotic values zero and one. 

  linear: [pPlot] - 
           a logical flag indicating the type of interpolation. 

logN, logStat: [pPlot] - 
           two logical flags deciding if the data should be on a 
          logarithmic scale or not. 

       N: an integer value or vector of sample sizes. 

nN, nStat: [pPlot] - 
           two integer values with the size of the table. 

  object: [show] - 
           an S4 object of class '"fHTEST"'. 

       p: a numeric value or vector of probabilities. 

    Stat: a numeric value or vector of quantiles or statistic values. 

       X: [pPlot][*Table] - 
           a data frame or matrix of a finite sample test table. 

     ...: [pPlot] - 
           additional arguments to be passed. 

_V_a_l_u_e:

     In contrast to R's output report from S3 objects of class
     '"htest"' a different output report is produced. The tests return
     an S4 object  of class '"fHTEST"'. The object contains the
     following slots:

   @call: the function call.   

   @data: the data as specified by the input argument(s). 

   @test: a list whose elements contail the results from the
          statistical test. The information provided is similar to a
          list object of class{"htest"}. 

  @title: a character string with the name of the test. This can be 
          overwritten specifying a user defined input argument. 

@description: a character string with an optional user defined
          description.  By default just the current date when the test
          was applied will be returned.

statistic: the value(s) of the test statistic. 

 p.value: the p-value(s) of the test. 

parameters: a numeric value or vector of parameters. 

estimate: a numeric value or vector of sample estimates. 

conf.int: a numeric two row vector or matrix of 95 

  method: a character string indicating what type of test was
          performed. 

data.name: a character string giving the name(s) of the data. 


     The functions 'pPlot', 'pTable', and 'qTable' plot and iterpolate
     finite sample test statistic data from a  table. The table is a
     data frame or a matrix where columns denote the size and rows the
     probabilities. The column and  row names must hold the sizes and
     probabilities as character strings. The values of the matrix hold
     the statistic values. 

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

     Diethelm Wuertz for the Rmetrics R-port.

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

     ## SOURCE("fBasics.5A-HypothesisTesting")

     ## fHTEST -
        getClass("fHTEST")

     ## pPlot -
     ## jbTable -
        # Interpolated plot of Small Jarque Bera Table:
        X = jbTable(type = "LM", size = "small")
        par(ask = FALSE)
        pPlot(X, linear = TRUE, logStat = TRUE)
        pPlot(X, linear = TRUE, logStat = TRUE, fill = TRUE, main = "JB LM")
        pPlot(X, linear = FALSE, logStat = TRUE)
        pPlot(X, linear = FALSE, logStat = TRUE, fill = TRUE)
         
     ## [pq]Table -
     ## jbTable - 
        # Jarque Bera B q and p Table:
        X = jbTable(type = "LM", size = "small")
        p = (1:99)/100
        plot(qTable(X, p, N = 100), p, type = "b")
        Stat = seq(0.01, 15, length = 100)
        plot(Stat, pTable(X, Stat, N = 100), type = "b")  

