isGYD                package:crossdes                R Documentation

_C_h_e_c_k_i_n_g _R_o_w-_C_o_l_u_m_n _D_e_s_i_g_n_s _f_o_r _B_a_l_a_n_c_e

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

     A function to check a row-column design for balance. The rows and
     columns of the design are blocking variables. It is checked, which
     type of balance the design fulfills.  Optionally, incidence
     matrices are given.

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

     isGYD(d, invis = FALSE, tables = FALSE, coded = FALSE)

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

       d: A matrix representing the experimental design. The treatments
          must be numbered 1,...,trt. 

   invis: Logical flag. If TRUE, the type of design is displayed. 

  tables: Logical flag. If TRUE, incidence matrices are given. 

   coded: Logical flag. If TRUE, a logical vector representing the type
          of design is displayed.

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

     A design is said to be a balanced block design if the following
     three conditions hold: i)   Each treatment appears equally often
     in the design. ii)  The design is binary, i.e. each treatment
     appears in each block either n or n+1 times where n is an integer.
      iii) The number of blocks where treatments i and j each occur n+1
     times is the same for all pairs of distinct treatments (i,j). Here
     the blocks are either rows or columns.

     A design that has less columns (rows) than treatments is said to
     be incomplete with respect to  rows (columns).  A design that is
     balanced with respect to both rows and columns is called a
     generalized Youden design (GYD). A GYD for which each treatment
     occurs equally often in each row (column) is called uniform on the
     rows (columns). If both conditions hold, it is called a
     generalized latin square.  A design where each treatment occurs
     exactly once in each row and column is called a latin square.

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

     If 'coded' is TRUE, a logical vector of length 8 is retured. The
     type of design is coded by this vector. If 'coded' is FALSE, no
     value is returned. If 'invis' is FALSE, the type of design is
     displayed on the screen. If 'tables' is TRUE, additional incidence
     tables (occurences of treatments and pairs of treatments) are
     displayed.

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

     Oliver Sailer sailer@statistik.uni-dortmund.de

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

     'isCbalanced'

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

     d1 <- matrix( c(1,2,3,4,1,1,1,1), 4,2)          
     # d1 is not balanced
     d2 <- matrix( c(1:4,2:4,1,4,1:3,3,4,1,2),ncol=4)    
     # d2 is a latin square
     d3 <- matrix( rep(1:3,each=2), ncol=2)          
     # d3 is a balanced incomplete block design.
     d1
     isGYD(d1,tables=TRUE)  
     d2
     isGYD(d2,tables=TRUE)
     d3
     isGYD(d3,tables=TRUE)    

