fbsize                  package:gap                  R Documentation

_S_a_m_p_l_e _s_i_z_e _f_o_r _f_a_m_i_l_y-_b_a_s_e_d _l_i_n_k_a_g_e _a_n_d _a_s_s_o_c_i_a_t_i_o_n _d_e_s_i_g_n

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

     This function implements Risch and Merikangas (1996) statistics 
     evaluating power for family-based linkage and association design.
     They are potentially useful in the prospect of genome-wide 
     association studies.

     The function calls auxiliary functions sn() and strlen; sn() 
     contains the necessary thresholds for power calculation while
     strlen() evaluates length of a string (generic).

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

     fbsize(gamma,p,debug=0,error=0)

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

   gamma: genotype relative risk assuming multiplicative model

       p: frequency of disease allele

   debug: verbose output

   error: 0=use the correct formula,1=the original paper

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

     The returned value is a list containing:

   gamma: input gamma

       p: input p

      n1: sample size for ASP

      n2: sample size for TDT

      n3: sample size for ASP-TDT

 lambdao: lambda o

 lambdas: lambda s

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

     Risch, N. and K. Merikangas (1996). The future of genetic studies
     of complex human diseases. Science 273(September): 1516-1517.

     Risch, N. and K. Merikangas (1997). Reply to Scott el al. Science
     275(February): 1329-1330.

     Scott, W. K., M. A. Pericak-Vance, et al. (1997). Genetic analysis
     of  complex diseases. Science 275: 1327.

_N_o_t_e:

     extracted from rm.c

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

     Jing Hua Zhao

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

     'pbsize'

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

     ## Not run: 
     models <- matrix(c(
         4.0, 0.01,
         4.0, 0.10,
         4.0, 0.50, 
         4.0, 0.80,
         2.0, 0.01,
         2.0, 0.10,
         2.0, 0.50,
         2.0, 0.80,
         1.5, 0.01,    
         1.5, 0.10,
         1.5, 0.50,
         1.5, 0.80), ncol=2, byrow=TRUE)
         
     cat("\nThe family-based result: \n")
     cat("\ngamma   p     Y     N_asp   P_A    Het    N_tdt  Het N_asp/tdt  L_o  L_s\n\n")
     for(i in 1:12) {
       g <- models[i,1]
       p <- models[i,2]
       fbsize(g,p)
       if(i%%4==0) cat("\n")
     }

     # APOE-4, Scott WK, Pericak-Vance, MA & Haines JL
     # Genetic analysis of complex diseases 1327
     g <- 4.5
     p <- 0.15
     cat("\nAlzheimer's:\n\n")
     fbsize(g,p)
     ## End(Not run)

