binomest                package:MCPAN                R Documentation

_O_n_l_y _f_o_r _i_n_t_e_r_n_a_l _u_s_e.

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

     Groupwise point and variance estimates for binomials, if data are
     given as numeric vectors of successes x and trials n, with I the
     number of levels in the one-way layout

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

     binomest(x, ...)

     ## Default S3 method:
     binomest(x, n, names=NULL, method="Wald", success=NULL, ...)

     ## S3 method for class 'formula':
     binomest(formula, data, method="Wald", success=NULL, ...)

     ## S3 method for class 'table':
     binomest(x, method="Wald", success=NULL, ...)

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

       x: either a numeric vector of the number of successes, then 'n'
          must be specified, or an object of class "table" as can be
          obtained by using 'table' on a data.frame with to categorical
          variables 

       n: a numeric vector of the number of trials, only needed, if 'x'
          is a numeric vector  

   names: optional character vector of group names (labels for later
          output), must have the same length as 'x' and 'n' 

 formula: 

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

  method: a character string, specifying the method for variance
          estimator, with options "Wald","ADD1","ADD2" 

 success: an optional character string, to indicate the level
          considered as success if data are given as table, or
          data.frame, or, serving as label for the event considered as
          success in later functions

     ...: currently not used

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

     Only for internal use.

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

       Y: a numeric vector of the groupwise number of successes

       n: a numeric vector of the groupwise number of trials
          (observations)

estimate: a numeric vector of groupwise point estimates, Y/n

    estp: a numeric vector of groupwise interval midpoints

    varp: a numeric vector of groupwise variance estimators, to be used
          for CI construction

  varcor: a numeric vector of groupwise variance estimators, to be used
          for correlation structures and test these values are adjusted
          to be larger than zero also in cases where Y=0 or Y=n

   names: a character vector of the level names of 'f'

 success: 

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

     Frank Schaarschmidt

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

     # if data are available as counts:

     nsuccess<-c(1,2,6,8)
     ntrials<-c(20,20,20,20)
     binomest(x=nsuccess, n=ntrials)

     binomest(x=nsuccess, n=ntrials, names=c("Control", "A", "B", "C"))

     # if data are available as data.frame with categorical response variable
     # and factor as grouping variable 

     data(liarozole)
     binomest(Improved ~ Treatment, data=liarozole)
     binomest(Improved ~ Treatment, data=liarozole, success="y")

     # if data are available as table
     # and factor as grouping variable 

     data(liarozole)
     tab<-table(liarozole)

     binomest(tab)
     binomest(tab, success="y")

