diffDetect             package:epibasix             R Documentation

_M_e_a_n _D_i_f_f_e_r_e_n_c_e _D_e_t_e_t_i_o_n _T_o_o_l

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

     Provides Minimum Detectable Difference in Means Between Two
     Populations for fixed values of sigma and n.  Useful for
     experimental design for randomized trials.

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

     diffDetect(N,sigma,alpha=0.05, power=0.8, two.tailed=TRUE)

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

       N: A Vector (or single value) of fixed sample sizes.

   sigma: A Vector (or single value) of fixed standard deviations
          sizes.

   alpha: The desired Type I Error Rate

   power: The desired level of power, recall power = 1 - Type II Error.

two.tailed: Logical, If TRUE calculations are based on a two-tailed
          Type I error, if FALSE, a one-sided calculation is performed.

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

     This function can be used as a tool for sensitivity analysis on
     the choice of population standard deviation.  As is often the
     case, the sample size is fixed by practical considerations, such
     as cost or difficulty recruiting subjects.  This simple tool may
     help determine whether it is worth performing an experiment that
     can only detect a given calculated difference between means.

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

   delta: A Matrix of minimum detectable differences for fixed values
          of n and sigma

       N: A Vector (or single value) of specified sample sizes.

   sigma: A Vector (or single value) of specified standard deviations
          sizes.

   alpha: The desired Type I Error Rate

   power: The desired level of power, recall power = 1 - Type II Error.

two.tailed: Logical, If TRUE calculations are based on a two-tailed
          Type I error, if FALSE, a one-sided calculation is performed.

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

     Michael Rotondi, mrotondi@uwo.ca

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

     Matthews JNS.  Introduction to Randomized Controlled Clinical
     Trials (2nd Ed.) Chapman & Hall: New York, 2006.

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

     ## Not run: 
     Suppose, for financial considerations we can only enroll 100 people in a blood
     pressure medication trial.  What is the minimum difference we can detect between means if 
     sigma = 1, 5 or 10 mmHg, at standard levels?
     ## End(Not run)
     n <- 100;
     sigma <- c(1, 5, 10);
     diffDetect(n,sigma);

