Skip to main content

Table 3 Orthogonal coding of dummy variables for nominal categorical factor levels using a single variable for 2 levels, two variables for 3 to 4 levels and three variables for 5 to 8 levels

From: Balance algorithm for cluster randomized trials

Number of levels Level Var1 Var2 Var3
2 1 -1 N/A N/A
  2 1   
3 1 -1 -1 N/A
  2 1 -1  
  3 -1 1  
4 1 -1 -1 N/A
  2 1 -1  
  3 -1 1  
  4 1 1  
5 1 -1 -1 -1
  2 1 -1 -1
  3 -1 1 -1
  4 -1 -1 1
  5 1 1 1
6 1 1 -1 -1
  2 -1 1 -1
  3 -1 -1 1
  4 -1 1 1
  5 1 -1 1
  6 1 1 -1
7 1 -1 -1 -1
  2 1 -1 -1
  3 -1 1 -1
  4 -1 -1 1
  5 -1 1 1
  6 1 -1 1
  7 1 1 -1
8 1 -1 -1 -1
  2 -1 -1 1
  3 -1 1 -1
  4 -1 1 1
  5 1 -1 -1
  6 1 1 -1
  7 1 -1 1
  8 1 1 1
\