Description Usage Arguments Value Functions Note Examples
Functions for converting between d_{ab} indexing of contrasts (useful
notationally) and d[i]
indexing used by R.
1 2 3 |
a |
Vector of treatment codes a. |
b |
Vector of treatment codes b. |
K |
Total number of treatments. |
i |
Vector of indices |
d_ab2i
returns a vector of indices i
. d_i2ab
returns a data frame of indices a
and b
.
d_ab2i
: Convert d[i]
type indices to d_{ab} type indices.
d_i2ab
: Convert d_{ab} type indices to d[i]
type indices.
By convention, 1 ≤ a < b ≤ K. If this is not the case, an error will be thrown. For a given number of treatments K, the total number of possible contrasts d_{ab} is K(K-1)/2, and hence i ≤ K. Again, if this is not the case, an error will be thrown.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.