Power                package:epicalc                R Documentation

_P_o_w_e_r _c_a_l_c_u_l_a_t_i_o_n _f_o_r _t_w_o _s_a_m_p_l_e _m_e_a_n_s _a_n_d _p_r_o_p_o_r_t_i_o_n_s

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

     Calculation for power given the results

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

     power.for.2p (p1, p2, n1, n2, alpha = 0.05) 
     power.for.2means  (mu1, mu2, n1, n2, sd1, sd2, alpha = 0.05) 

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

  p1, p2: probabilities of the two sample

  n1, n2: sample sizes of the two sample

   alpha: significance level

mu1, mu2: means of the two samples

sd1, sd2: standard deviations of the two samples

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

     These two functions compute the power of a study from the given
     results

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

     Virasakdi Chongsuvivatwong <cvirasak@medicine.psu.ac.th>

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

     'n.for.2means', 'n.for.2p'

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

     # Suppose, in the example found in 'help(n.for.2p)', 
     # given the two proportions are found at .8 and .6 but the sample size 
     # for each group is 60.

     power.for.2p(p1=.8, p2=.6, n1=60, n2=60) # 59 percent

     # If the means of an continuous outcome variable in the same 
     # two groups were 50 and 60 units and the sd's were 30 and 35 units, 
     # then the power to detect statistical significance would be

     power.for.2means(mu1=50, mu2=60, sd1=30, sd2=35, n1=60, n2=60) 
     # 39 percent. Note the graphic display

