power.prop.test            package:stats            R Documentation

_P_o_w_e_r _c_a_l_c_u_l_a_t_i_o_n_s _t_w_o _s_a_m_p_l_e _t_e_s_t _f_o_r _p_r_o_p_o_r_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     Compute power of test, or determine parameters to obtain target
     power.

_U_s_a_g_e:

     power.prop.test(n = NULL, p1 = NULL, p2 = NULL, sig.level = 0.05,
                     power = NULL,
                     alternative = c("two.sided", "one.sided"),
                     strict = FALSE)

_A_r_g_u_m_e_n_t_s:

       n: Number of observations (per group)

      p1: probability in one group

      p2: probability in other group

sig.level: Significance level (Type I error probability)

   power: Power of test (1 minus Type II error probability)

alternative: One- or two-sided test

  strict: Use strict interpretation in two-sided case

_D_e_t_a_i_l_s:

     Exactly one of the parameters 'n', 'p1', 'p2', 'power', and
     'sig.level' must be passed as NULL, and that parameter is
     determined from the others. Notice that 'sig.level' has a non-NULL
     default so NULL must be explicitly passed if you want it 
     computed.

     If 'strict = TRUE' is used, the power will include the probability
     of rejection in the opposite direction of the true effect, in the
     two-sided  case. Without this the power will be half the
     significance level if the  true difference is zero.

_V_a_l_u_e:

     Object of class '"power.htest"', a list of the arguments
     (including the computed one) augmented with 'method' and 'note'
     elements.

_N_o_t_e:

     'uniroot' is used to solve power equation for unknowns, so you may
     see errors from it, notably about inability to bracket the root
     when invalid arguments are given. If one of them is computed 'p1 <
     p2' will hold, although this is not enforced when both are
     specified.

_A_u_t_h_o_r(_s):

     Peter Dalgaard.  Based on previous work by Claus Ekstrom

_S_e_e _A_l_s_o:

     'prop.test', 'uniroot'

_E_x_a_m_p_l_e_s:

      power.prop.test(n = 50, p1 = .50, p2 = .75)
      power.prop.test(p1 = .50, p2 = .75, power = .90)
      power.prop.test(n = 50, p1 = .5, power = .90)

