AnalysisStack function can be used to get the results generated in the Clinical Scenario Evaluation. The generation of the analysis stack is based on the pre-defined
AnalysisStack function requires the input of three pre-specified objects defined in the following three arguments:
DataModelobject, as described in this page.
AnalysisModelobject, as described in this page.
SimParametersobject, as described in this page.
AnalysisStack function returns an
AnalysisStack object containing a list with the following components:
description: a description of the object.
analysis.set: a list of size
n.simsdefined in the
SimParametersobject. This list contains the analysis results generated for each data scenario (first level), and for each test and statistic defined in the
AnalysisModelobject. The results generated for the ith simulation runs and the jth data scenario are stored in
AnalysisStackobject). Then, this list is composed of three lists:
testsreturn the unadjusted p-values for to the tests defined in the
statisticreturn the statistic defined in the
test.adjustreturn a list of adjusted p-values according to the multiple testing procedure(s) defined in the
AnalysisModelobject. The lenght of this list corresponds to the number of
MultAdjProcobjects defined in the
AnalysisModelobject. Note that if no
MultAdjProcobjects have been defined, this list contains the unadjusted p-values.
analysis.scenario.grid: a data frame indicating all data and analysis scenarios according to the
analysis.structure: a list containing the analysis structure according to the
sim.parameters: a list containing the simulation parameters according to
The following example illustrates the use of the
In this example, we will use the data model and simulation parameters specified in the Case study 1 for normally distributed endpoints (see Case study 1).
Specification of the
The data model is specified below:
Specification of the
The analysis model is specified below:
Specification of the
Additionally, the simulation parameters are specified:
The results generated in the CSE function can be obtained using the
AnalysisStack function as follows:
Manipulation of an
AnalysisStack object has been generated, the user can manipulate the object easily as it is structure as a
list object. Basically, the results sets are stored in the
analysis.set level of the object. This length of the list corresponds to the number of simulations specified in the
Within each simulation run, a nested list is used to store the results set for each data and analysis scenario, for each test and statistic. For example, the user can access to the results generated in the 100th simulation run for the 2nd data scenario as follows:
To ease the manipulation of a
AnalysisStack object, a function has been created to extract a particular set of results stack according to the data scenario and simulation runs index.
ExtractAnalysisStack function requires the input of a pre-specified object defined in the following two arguments:
AnalysisStackobject, as described above.
data.scenariodefines the data scenario index to extract. By default all data scenarios will be extracted.
simulation.rundefines the simulation run index. By default all simulation runs will be extracted.
ExtractAnalysisStack function returns a list having the same structure as the
analysis.set argument of a
analysis.set: a list of size corresponding to the number of simulation runs specified by the user defined in the
simulation.runargument. This list contains the results generated for each data scenario (
data.scenarioargument) specified by the user.
Returning to our example, the user can extract the results generated for the 100th simulation run and the 2nd data scenario as follows:
A carefull attention should be paid on the index of the nested lists. As only one simulation run index has been specified in this example, the result for the 100th simulation runs is stored in the first level of the list (
case.study1.extracted.analysis.stack$analysis.set[]). Similarly, as only one data scenario has been requested, the result for the 2nd data scenario is now in the first position (