binomRDtest              package:MCPAN              R Documentation

_S_i_m_u_l_t_a_n_e_o_u_s _t_e_s_t _f_o_r _c_o_n_t_r_a_s_t_s _o_f _i_n_d_e_p_e_n_d_e_n_t _b_i_n_o_m_i_a_l _p_r_o_p_o_r_t_i_o_n_s (_i_n _a _o_n_e_w_a_y _l_a_y_o_u_t)

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

     P-value of maximum test and adjusted p-values for M contrasts of I
     groups in a one-way layout. Tests are performed for contrasts of
     proportions, which can be interpreted as differences of (weighted
     averages of) proportions.

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

     binomRDtest(x, ...)

     ## Default S3 method:
     binomRDtest(x, n, names=NULL,
      type="Dunnett", cmat=NULL, method="Wald",
      alternative="two.sided",...)

     ## S3 method for class 'formula':
     binomRDtest(formula, data,
      type="Dunnett", cmat=NULL, method="Wald",
      alternative="two.sided",...)

     ## S3 method for class 'table':
     binomRDtest(x, type="Dunnett",
      cmat=NULL, method="Wald", alternative="two.sided",...)

     ## S3 method for class 'matrix':
     binomRDtest(x, type="Dunnett",
      cmat=NULL, method="Wald", alternative="two.sided",...)

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

       x: a numeric vector, giving the number of successes in I
          independent samples, or an object of class '"table"',
          representing the 2xk-table, or an object of class '"matrix"',
          representing the 2xk-table 

       n: a numerioc vector, giving the number of trials (i.e. the
          sample size) in each of the I groups 

   names: an optional character vector, giving the names of the groups
          in 'x', 'n'; if not specified, possibly availbale names of x
          are taken as group names

 formula: a two-sided formula of the style 'response ~ treatment',
          where 'response' should be a categorical variable with two
          levels, while treatment should be a factor specifying the
          treatment levels

    data: a data.frame, containing the variables specified in formula

    type: a character string specifying the contrast type 

    cmat: an optional user defined contrast matrix of dimension MxI

  method: a single charcter string, specifying the method for
          adjustment, with options: "Wald" (Maximum likelihood
          estimators), "ADD1" (add1-adjustment on the raw proportion
          estimates) "ADD2" (add2-adjustment on proportion estimates
          following Agresti Caffo (2000)) 

alternative: a character string specifying the direction of the
          alternative hypothesis

     ...: arguments to be passed to 'binomest', currently only
          'success' labelling the event which should be considered as
          success

_D_e_t_a_i_l_s:

     For usage, see the examples.

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

     An object of class "binomRDtest", a list containing: 

teststat: a numeric vector of teststatistics of length M

    pval: a single numeric p-value, the p-value of the maximum test
          (minimum p-value)

p.val.adj: a vector of length M, the adjusted p-values of the single
          contrasts

alternative: a single character vector, as the input

       x: the observed number of successes in the treatment groups

       n: the number of trials in the treatment groups

       p: the estimated proportions in the treatment groups

 success: a character string labelling the event considered as success

  method: as input, a character string

    cmat: used contrast matrix

_N_o_t_e:

     Note, that all implemented methods are approximate only. The size
     of the  test might seriously deviate from the nominal level for
     small sample sizes and extreme success probabilities. See the
     simulation results in Sill (2007) for details.

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

     Frank Schaarschmidt

_R_e_f_e_r_e_n_c_e_s:

     Statistical procedures and characterization of coverage
     probabilities are described in: Sill, M. (2007): .... Master
     thesis, Institute of Biostatistics, Leibniz University Hannover.

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

     'summary.binomRDtest'

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

     ntrials <- c(40,20,20,20)
     xsuccesses <- c(1,2,2,4)
     names(xsuccesses) <- LETTERS[1:4]
     binomRDtest(x=xsuccesses, n=ntrials, method="ADD1", type="Dunnett")

     binomRDtest(x=xsuccesses, n=ntrials, method="ADD1", type="Williams", alternative="greater")

     binomRDtest(x=xsuccesses, n=ntrials, method="ADD2", type="Williams", alternative="greater")

