<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: A Function to generate the 2^n treatment combinations in...</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body>

<table width="100%" summary="page for trtcombo.std.order"><tr><td>trtcombo.std.order</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>A Function to generate the 2^n treatment combinations in their standard order,
for a symmetric 2^n factorial experiment.</h2>

<h3>Description</h3>

<p>The function basically utilizes a very basic algorithm, for listing down
all possible treatment combinations in a 2^n experiment, where stating the treatment combinations
for large values of n, say n = 8, i.e., a 2^8 experiment, could be quite a task, as there are a total
of 2^8 = 256 treatment combinations to be listed, starting from 1,a,b,ab,......,abcdefgh.
</p>
<p>Hence, the function eases the task of listing down all the possible treatment combinations, in a specific
standard order, irrespective of the magnitude of 'n'.
</p>
<p>For example - Suppose we consider a 2^4 factorial experiment. The total number of treatment combinations
are 2^4 = 16. Implementing the function would list down all possible treatment combinations in a standard order
as follows, '1','a','b','ab','c','ac','bc','abc','d','ad','bd','abd','cd','acd','bcd','abcd'.
</p>
<p>Therefore, the algorithm of listing down the Treatment Combinations in a 2^n Factorial Experiment, in the
standard order is as follows,
</p>
<p>Step 1 :: Start with the control group labeled as '1', where all factors considered in the design are at a
lower level.
</p>
<p>Step 2 :: Select a new alphabet (denoting the respective factors) in lexicographic order, multiplying (concatenating)
it with the previous alphabets till the last in the list.
</p>
<p>Step 3 :: Repeat Step 2 until all the alphabets, representing specific factors in the experiment, gets exhausted.
</p>


<h3>Usage</h3>

<pre>
trtcombo.std.order(n)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>n</code></td>
<td>
<p>A numeric value - Denoting the number of factors involved in a 2^n factorial experiment.</p>
</td></tr>
</table>


<h3>Value</h3>

<p>A character type vector comprising of all possible treatment combinations in a 2^n factorial experiment
in their standard order.
</p>


<h3>Author(s)</h3>

<p>Somjit Roy
</p>


<h3>See Also</h3>

<p>The generation of all possible treatment combinations in a specific standard order in the symmetric 2^n
factorial experiment, is of great importance because it helps to record all the combinations without missing out
on any of the combinations, especially when 'n', i.e., the number of factors involved in the experiment is quite
large.
</p>
<p>Listing down the treatment combinations in their standard order, gets utilized in the analysis of the factorial
experiment under consideration, also this way of reporting and listing the treatment combinations facilitates
during 'construction of Fractional Factorial Experiment', 'Confounding of treatment effects in a factorial experiment',
etc.
</p>


<h3>Examples</h3>

<pre>
# For a 2^2 factorial experiment, we will obtain all the 4 possible treatment combinations,
# in their standard order as , '1','a','b' and 'ab'. Running the following line of code
# would give the desired result.

trtcombo.std.order(2)

# Similarly, for a 2^5 experiment, we will obtain all the 32 possible
# treatment combinations, in their standard order, by running the following line of code,

trtcombo.std.order(5)
</pre>


</body></html>
