regimeMatrix {maticce} | R Documentation |
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.
regimeMatrix(n, maxNodes)
n |
An integer between 1 and maxNodes
|
maxNodes |
An integer between 1 and n; at n = maxNodes , regimeMatrix will return a matrix of 2^n rows.
|
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
# evaluating a set of models 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]))