epi2x2               package:epibasix               R Documentation

_E_p_i_d_e_m_i_o_l_o_g_i_c_a_l _2_x_2 _C_o_n_t_i_n_g_e_n_c_y _T_a_b_l_e _A_n_a_l_y_s_i_s _T_o_o_l

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

     This function analyzes 2x2 tables assuming either a case-control
     or cohort study.   Information such as Pearson's chi-squared test,
     the odds ratio, risk difference and relative risk are computed, as
     well as confidence intervals.

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

     epi2x2(X,alpha=0.05, digits=3)

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

       X: A 2x2 matrix in standard epidemiological format, that is,
          column one represents outcome present, column two outcome
          absent, while row one represents risk present and row two
          represents risk absent.  This is crucial for correct
          computation of odds ratio and parameters.

   alpha: The desired Type I Error Rate for Hypothesis Tests and
          Confidence Intervals

  digits: Number of Digits to round calculations

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

     This function is similar to PROC FREQ in SAS, as it provides the
     comprehensive analysis of a 2x2 contingency table.  Again, I must
     stress that the table must be entered in the appropriate format,
     or unsuitable estimates will result.  In a case control study,
     cases should be entered as column one and controls as column two.

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

       X: The original input matrix.

      Sy: Value for Pearson's Chi-squared statistic (with continuity
          correction).

Sy.p.value: P-value for the hypothesis test of no association.

Fisher.p.value: P-value for the hypothesis test of no association.
          (Using Fisher's Exact Test)

      OR: Point Estimate of the odds ratio.

  OR.CIL: Lower Confidence Limit for the odds ratio.

  OR.CIU: Upper Confidence Limit for the odds ratio.

    p1Co: Row One Risk (Cohort Study)

    p2Co: Row Two Risk (Cohort Study)

    rdCo: Risk difference (Cohort Study).  That is p1Co - p2Co.

rdCo.CIL: Lower Confidence Limit for Risk Difference in a cohort study.

rdCo.CIU: Upper Confidence Limit for Risk Difference in a cohort study.

      RR: Relative Risk (Cohort Study)

  RR.CIL: Lower Confidence Limit for Relative Risk in a cohort study.

  RR.CIU: Upper Confidence Limit for Relative Risk in a cohort study.

    p1CC: Column One Risk (Case-Control Study)

    p2CC: Column Two Risk (Case-Control Study)

    rdCC: Risk difference (Case-Control Study).  That is p1CC - p2CC.

rdCC.CIL: Lower Confidence Limit for Risk Difference in a case-control
          study.

rdCC.CIU: Upper Confidence Limit for Risk Difference in a case-control
          study.

   alpha: The desired Type I Error Rate for Hypothesis Tests and
          Confidence Intervals

  digits: Number of Digits to round calculations

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

     Michael Rotondi, mrotondi@uwo.ca

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

     Szklo M and Nieto FJ.  Epidemiology: Beyond the Basics, Jones and
     Bartlett: Boston, 2007.

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

     'mcNemar'

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

     data <- cbind(c(100, 225), c(58, 45));
     summary(epi2x2(data));

