"modelObjSubset"
,
create a list storing the objects according to decision point.
Method is not exported..newModelObjSubset(object)
"list"
, each element
an object of class "ModelObjSubset"
.object
contains subset models for only a single
decision point, returns an object of class "ModelObj_SubsetList"
.If object
contains subset models for multiple
decision points, returns an object of class "ModelObj_SubsetList_DecisionPointList"
.
buildModelObjSubset()
.
This method determines if that list provides subset models
for a single decision point (stored as an object of class
"ModelObj_SubsetList"
or for multiple decision points
(subset models are grouped according to their decision point
and stored as an object of class "ModelObj_SubsetList_DecisionPointList."
models <- list()
models[[1L]] <- buildModelObjSubset(model = ~x1,
solver.method = 'lm',
subset = "subset1",
dp = 1L)
models[[2L]] <- buildModelObjSubset(model = ~x2,
solver.method = 'lm',
subset = "subset2",
dp = 1L)
result <- DynTxRegime:::.newModelObjSubset(models)
is(result)
models[[3L]] <- buildModelObjSubset(model = ~x3,
solver.method = 'lm',
subset = "subset1",
dp = 2L)
result <- DynTxRegime:::.newModelObjSubset(models)
is(result)
Run the code above in your browser using DataLab