corXY                package:epibasix                R Documentation

_C_o_r_r_e_l_a_t_i_o_n _o_f _T_w_o _V_e_c_t_o_r_s

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

     This function displays the simple correlation of two vectors of
     equal length, as well as providing confidence limits and
     hypothesis tests.

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

     corXY(X, Y, alpha=0.05, rho0 = 0, HA="not.equal", digits=3)

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

       X: A Vector of the same length as Y

       Y: A Vector of the same length as X, This function requires the
          input of Vectors

   alpha: The Type I error rate for Hypothesis Tests and Confidence
          Intervals

    rho0: The Null Hypothesis for Hypothesis Tests

      HA: The alternative hypothesis can be one of "less.than",
          "greater.than", or "not.equal"

  digits: The number of digits to round results

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

     This function provides the required information, such as the
     Pearson correlation Hypothesis Tests and confidence intervals,
     while providing suitable detail in the and print statements for
     epidemiologists to understand the information at hand.

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

     rho: The Sample Pearson Correlation, as calculated in the cor
          function.

       n: The sample size.

    Test: The Test Statistic for the desired hypothesis test based on
          Fisher's Transformation.

 p.Value: The p-value for the Hypothesis Test.

     CIL: The lower bound of the constructed confidence interval for
          rho, again based on Fisher's Z Transformation.

     CIU: The Upper bound of the constructed confidence interval for
          rho, again based on Fisher's Z Transformation.

   alpha: The desired Type I Error Rate

    rho0: The Null Hypothesis

      HA: The supplied Alternative Hypothesis

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

     Michael Rotondi, mrotondi@uwo.ca

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

     Casella G and Berger RL.  Statistical Inference (2nd Ed.) Duxbury:
     New York, 2002. Koepsell TD and Weiss NS.  Epidemiologic Methods. 
     Oxford University Press: New York, 2003.

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

     ## Not run: Suppose we want to test whether two randomly generated normal vectors are uncorrelated
     x <- rnorm(100);
     y <- rnorm(100);
     corXY(x,y);

