contrMat              package:multcomp              R Documentation

_C_o_n_t_r_a_s_t _M_a_t_r_i_c_e_s

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

     Computes contrast matrices for several multiple comparison
     procedures.

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

     contrMat(n, type = c("Dunnett", "Tukey", "Sequen", "AVE", 
                          "Changepoint", "Williams", "Marcus", 
                          "McDermott", "UmbrellaWilliams", "GrandMean"), 
              base = 1)

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

       n: a (possibly named) vector of sample sizes for each group.

    type: type of contrast. 

    base: an integer specifying which group is considered the baseline
          group for Dunnett contrasts.

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

     Computes the requested matrix of contrasts for comparisons of mean
     levels.

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

     The matrix of contrasts with appropriate row names is returned.

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

     Frank Bretz, Alan Genz and Ludwig A. Hothorn (2001), On the
     numerical  availability of multiple comparison procedures.
     _Biometrical Journal_, *43*(5), 645-656.

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

      n <- c(10,20,30,40)
      names(n) <- paste("group", 1:4, sep="")
      contrMat(n)    # Dunnett is default
      contrMat(n, base = 2)  # use second level as baseline
      contrMat(n, type = "Tukey")
      contrMat(n, type = "Sequen")
      contrMat(n, type = "AVE")
      contrMat(n, type = "Changepoint")
      contrMat(n, type = "Williams")
      contrMat(n, type = "Marcus")
      contrMat(n, type = "McDermott")
      ### Umbrella-protected Williams contrasts, i.e. a sequence of 
      ### Williams-type contrasts with groups of higher order 
      ### stepwise omitted
      contrMat(n, type = "UmbrellaWilliams")
      ### comparison of each group with grand mean of all groups
      contrMat(n, type = "GrandMean")

