Description Usage Arguments Details Value Note Author(s) See Also Examples
regimeMatrix is a recursive function that returns a matrix of n columns by k rows, where n is a number
of items and k is the number of all possible permutations of those items, up to a maximum number of items
defined by maxNodes, and including a row with zero items.
1 2 | regimeMatrix(n, maxNodes)
|
n |
An integer between 1 and |
maxNodes |
An integer between 1 and n; at |
Typically, this function is called by regimeVectors,
but it may be useful to call this function if you are interested in defining an arbitrary set of models
that doesn't include all possible models in the
A matrix of n columns by k rows, where n is a number
of items and k is the number of all possible permutations of those items, up to a maximum number of items
defined by maxNodes, and including a row with zero items
Use of regimeMatrix or regimeMaker to generate tailored sets of regimes is not currently integrated smoothly with runBatchHansen,
but for the time being they can be used to create regimes for manual analysis.
Andrew Hipp ahipp@mortonarb.org
1 2 3 4 5 6 | # allowing all possible permutations of changes at 15 nodes will be quite time-consuming:
print(paste("Number of models =", dim(regimeMatrix(15,15))[1]))
# paring that down to all possible permutations of changes at 15 nodes,
# up to a maximum of 5 changes, is much more manageable:
print(paste("Number of models =", dim(regimeMatrix(15,5))[1]))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.