pfc                   package:gap                   R Documentation

_P_r_o_b_a_b_i_l_i_t_y _o_f _f_a_m_i_l_i_a_l _c_l_u_s_t_e_r_i_n_g _o_f _d_i_s_e_a_s_e

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

     To calculate exact probability of familial clustering of disease

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

     pfc(famdata,enum)

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

 famdata: collective information of sib size, number of affected sibs
          and their frequencies

    enum: a switch taking value 1 if all possible tables are to be
          enumerated

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

     The returned value is a list containing (tailp,sump,nenum are only
     available if enum=1):

       p: the probabitly of familial clustering

    stat: the deviances, chi-squares based on binomial and
          hypergeometric distributions,  the degrees of freedom should
          take into account the number of marginals used

   tailp: the exact statistical significance

    sump: sum of the probabilities used for error checking

   nenum: the total number of tables enumerated

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

     Yu C and D Zelterman (2001) Exact inference for family disease
     clusters. Commun Stat - Theory Meth 30:2293-2305

     Yu C and Zelterman D (2002) Statistical inference for familial
     disease clusters. Biometrics 58:481-491

_N_o_t_e:

     Adapted from family.for by Dani Zelterman, 25/7/03

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

     Dani Zelterman, Jing Hua Zhao

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

     'kin.morgan'

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

     ## Not run: 
     # IPF among 203 siblings of 100 COPD patients from Liang KY, SL Zeger, B Qaquish (1992)
     # Multivariate regression analyses for categorical data (with discussion). J Roy Stat Soc
     # B 54:3-40

     # the degrees of freedom is 15
     famtest<-c(
     1, 0, 36,
     1, 1, 12,
     2, 0, 15,
     2, 1,  7,
     2, 2,  1,
     3, 0,  5,
     3, 1,  7,
     3, 2,  3,
     3, 3,  2,
     4, 0,  3,
     4, 1,  3,
     4, 2,  1,
     6, 0,  1,
     6, 2,  1,
     6, 3,  1,
     6, 4,  1,
     6, 6,  1)
     test<-t(matrix(famtest,nrow=3))
     famp<-pfc(test)
     ## End(Not run)

