This example shows the definition and results for a single analysis, "Summary of Subjects by Treatment and Sex", including the definitions of the grouping factors and method referenced by the analysis. This example illustrates the use of the the groupingId and groupId attributes of the ResultGroup class to associate results with groups in results-by-group grouping factors with predefined groups.
Xfancy |
---|
|
Lines 1-3133: | Show the definitions of the 2 subject grouping factors referenced by the analysis, both of which are not data-driven (dataDriven = false, shown on lines 3 6 and 1724): - Lines 2-1819: Show the definition of the "Treatment" grouping factor, which has 3 groups: "Placebo", "Xanomeline Low Dose", and "Xanomeline High Dose".
- Lines 1920-3133: Show the definition of the "Sex" grouping factor, which has 2 groups: "Male" and "Female".
| Lines 3234-4448: | Show the definition of the method referenced by the analysis, "Summary by group of a categorical variable", which has 2 operations: - Lines 3638-3942: Show the definition of the "Count of subjects" operation.
- Lines 4043-4447: Show the definition of the "Percent of subjects" operation.
| Lines 4649-5862: | Show the definition of the analysis: - Lines 4953-5054: Show that this is an analysis of the USUBJID variable in the ADSL dataset.
- Line 5155: Shows the reference to the "Summary by group of a categorical variable" method.
- Lines 5256-5862: Show the references to the 2 grouping factors, both of which are marked as producing a result for each group in the grouping factor (resultsByGroup = true, shown on lines 54 58 and 5761).
| Lines 5963-155161 | Show the list of results for the analysis. Each entry in the list (the start of which is indicated starting with the operationId attribute preceded by a leading hyphen) represents an instance of the OperationResult class and contains: - The identifier value of the statistical operation performed in the , which is in the operationId attribute.
- In the resultGroups attribute, a reference to both grouping factor groups associated with the result (indicated by the values of the groupingId and groupId attributes)
- The raw result value in the rawValue attribute, and
- In the formattedValue attribute, the result value formatted according to the pattern specified in the resultPattern attribute of the operation referenced by the operationId value. The specified patterns are shown on rows 39 42 and 4347.
|
|
Code Block |
---|
title | YAML Example |
---|
linenumbers | true |
---|
|
analysisGroupings:
- id: AnlsGrouping_01_Trt
dataDrivenname: falseTreatment
labelgroupingDataset: TreatmentADSL
groupingVariable: TRT01A
dataDriven: false
groups:
- id: AnlsGrouping_01_Trt_1
labelname: Placebo
order: 1
...
- id: AnlsGrouping_01_Trt_2
labelname: Xanomeline Low Dose
order: 2
...
- id: AnlsGrouping_01_Trt_3
labelname: Xanomeline High Dose
order: 3
...
- id: AnlsGrouping_02_Sex
dataDrivenname: falseSex
labelgroupingDataset: SexADSL
groupingVariable: SEX
dataDriven: false
groups:
- id: AnlsGrouping_02_Sex_1
labelname: Male
order: 1
...
- id: AnlsGrouping_02_Sex_2
labelname: Female
order: 2
...
methods:
- id: Mth01_CatVar_Summ_ByGrp
name: Summary by group of a categorical variable
operations:
- id: Mth01_CatVar_Summ_ByGrp_1_n
name: Count of subjects
label: n
order: 1
resultPattern: XXX
- id: Mth01_CatVar_Summ_ByGrp_2_pct
name: Percent of subjects
label: '%'
order: 2
resultPattern: ( XX.X)
...
analyses:
- id: An03_03_Sex_Summ_ByTrt
name: Summary of Subjects by Treatment and Sex
version: 1
dataset: ADSL
variable: USUBJID
methodId: Mth01_CatVar_Summ_ByGrp
orderedGroupings:
- order: 1
resultsByGroup: true
groupingId: AnlsGrouping_01_Trt
- order: 2
resultsByGroup: true
groupingId: AnlsGrouping_02_Sex
results:
- operationId: Mth01_CatVar_Summ_ByGrp_1_n
resultGroups:
- groupingId: AnlsGrouping_01_Trt
groupId: AnlsGrouping_01_Trt_1
- groupingId: AnlsGrouping_02_Sex
groupId: AnlsGrouping_02_Sex_1
rawValue: '33'
formattedValue: '33'
- operationId: Mth01_CatVar_Summ_ByGrp_1_n
resultGroups:
- groupingId: AnlsGrouping_01_Trt
groupId: AnlsGrouping_01_Trt_1
- groupingId: AnlsGrouping_02_Sex
groupId: AnlsGrouping_02_Sex_2
rawValue: '53'
formattedValue: '53'
- operationId: Mth01_CatVar_Summ_ByGrp_1_n
resultGroups:
- groupingId: AnlsGrouping_01_Trt
groupId: AnlsGrouping_01_Trt_2
- groupingId: AnlsGrouping_02_Sex
groupId: AnlsGrouping_02_Sex_1
rawValue: '34'
formattedValue: '34'
- operationId: Mth01_CatVar_Summ_ByGrp_1_n
resultGroups:
- groupingId: AnlsGrouping_01_Trt
groupId: AnlsGrouping_01_Trt_2
- groupingId: AnlsGrouping_02_Sex
groupId: AnlsGrouping_02_Sex_2
rawValue: '50'
formattedValue: '50'
- operationId: Mth01_CatVar_Summ_ByGrp_1_n
resultGroups:
- groupingId: AnlsGrouping_01_Trt
groupId: AnlsGrouping_01_Trt_3
- groupingId: AnlsGrouping_02_Sex
groupId: AnlsGrouping_02_Sex_1
rawValue: '44'
formattedValue: '44'
- operationId: Mth01_CatVar_Summ_ByGrp_1_n
resultGroups:
- groupingId: AnlsGrouping_01_Trt
groupId: AnlsGrouping_01_Trt_3
- groupingId: AnlsGrouping_02_Sex
groupId: AnlsGrouping_02_Sex_2
rawValue: '40'
formattedValue: '40'
- operationId: Mth01_CatVar_Summ_ByGrp_2_pct
resultGroups:
- groupingId: AnlsGrouping_01_Trt
groupId: AnlsGrouping_01_Trt_1
- groupingId: AnlsGrouping_02_Sex
groupId: AnlsGrouping_02_Sex_1
rawValue: '38.372093023255815'
formattedValue: ( 38.4)
- operationId: Mth01_CatVar_Summ_ByGrp_2_pct
resultGroups:
- groupingId: AnlsGrouping_01_Trt
groupId: AnlsGrouping_01_Trt_1
- groupingId: AnlsGrouping_02_Sex
groupId: AnlsGrouping_02_Sex_2
rawValue: '61.627906976744185'
formattedValue: ( 61.6)
- operationId: Mth01_CatVar_Summ_ByGrp_2_pct
resultGroups:
- groupingId: AnlsGrouping_01_Trt
groupId: AnlsGrouping_01_Trt_2
- groupingId: AnlsGrouping_02_Sex
groupId: AnlsGrouping_02_Sex_1
rawValue: '40.476190476190474'
formattedValue: ( 40.5)
- operationId: Mth01_CatVar_Summ_ByGrp_2_pct
resultGroups:
- groupingId: AnlsGrouping_01_Trt
groupId: AnlsGrouping_01_Trt_2
- groupingId: AnlsGrouping_02_Sex
groupId: AnlsGrouping_02_Sex_2
rawValue: '59.523809523809526'
formattedValue: ( 59.5)
- operationId: Mth01_CatVar_Summ_ByGrp_2_pct
resultGroups:
- groupingId: AnlsGrouping_01_Trt
groupId: AnlsGrouping_01_Trt_3
- groupingId: AnlsGrouping_02_Sex
groupId: AnlsGrouping_02_Sex_1
rawValue: '52.38095238095238'
formattedValue: ( 52.4)
- operationId: Mth01_CatVar_Summ_ByGrp_2_pct
resultGroups:
- groupingId: AnlsGrouping_01_Trt
groupId: AnlsGrouping_01_Trt_3
- groupingId: AnlsGrouping_02_Sex
groupId: AnlsGrouping_02_Sex_2
rawValue: '47.61904761904762'
formattedValue: ( 47.6)
...
... |
The results for this analysis could be represented in tabular format as shown in the following table, where the value of the id attribute of the analysis is shown in the "analysisId" column and the groupingId and groupId values from the 2 two instances of the ResultGroup class found in the resultGroups attribute for each each result are represented in separate pairs of columns ("groupingId1"/"groupId1" and "groupingId2"/"groupId2") so that each result is represented on a single row:
Dataset2 |
---|
analysisId | operationId | groupingId1 | groupId1 | groupingId2 | groupId2 | rawValue | formattedValue |
---|
An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_1_n | AnlsGrouping_01_Trt | AnlsGrouping_01_Trt_1 | AnlsGrouping_02_Sex | AnlsGrouping_02_Sex_1 | 33 | 33 | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_1_n | AnlsGrouping_01_Trt | AnlsGrouping_01_Trt_1 | AnlsGrouping_02_Sex | AnlsGrouping_02_Sex_2 | 53 | 53 | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_1_n | AnlsGrouping_01_Trt | AnlsGrouping_01_Trt_2 | AnlsGrouping_02_Sex | AnlsGrouping_02_Sex_1 | 34 | 34 | Mth01An03_03_CatVarSex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrpByGrp_1_n | AnlsGrouping_01_Trt | AnlsGrouping_01_Trt_2 | AnlsGrouping_02_Sex | AnlsGrouping_02_Sex_2 | 50 | 50 | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_1_n | AnlsGrouping_01_Trt | AnlsGrouping_01_Trt_3 | AnlsGrouping_02_Sex | AnlsGrouping_02_Sex_1 | 44 | 44 | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_1_n | AnlsGrouping_01_Trt | AnlsGrouping_01_Trt_3 | AnlsGrouping_02_Sex | AnlsGrouping_02_Sex_2 | 40 | 40 | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_2_pct | AnlsGrouping_01_Trt | AnlsGrouping_01_Trt_1 | AnlsGrouping_02_Sex | AnlsGrouping_02_Sex_1 | 38.3720930232558 | ( 38.4) | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_2_pct | AnlsGrouping_01_Trt | AnlsGrouping_01_Trt_1 | AnlsGrouping_02_Sex | AnlsGrouping_02_Sex_2 | 61.6279069767442 | ( 61.6) | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_2_pct | AnlsGrouping_01_Trt | AnlsGrouping_01_Trt_2 | AnlsGrouping_02_Sex | AnlsGrouping_02_Sex_1 | 40.4761904761905 | ( 40.5) | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_2_pct | AnlsGrouping_01_Trt | AnlsGrouping_01_Trt_2 | AnlsGrouping_02_Sex | AnlsGrouping_02_Sex_2 | 59.5238095238095 | ( 59.5) | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_2_pct | AnlsGrouping_01_Trt | AnlsGrouping_01_Trt_3 | AnlsGrouping_02_Sex | AnlsGrouping_02_Sex_1 | 52.3809523809524 | ( 52.4) | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_2_pct | AnlsGrouping_01_Trt | AnlsGrouping_01_Trt_3 | AnlsGrouping_02_Sex | AnlsGrouping_02_Sex_2 | 47.6190476190476 | ( 47.6) |
|
Alternatively, to aid readability, each of the identifier values could be used to retrieve and include additional the name or label (or any other descriptive information) from the definitions of the operations, grouping factors, and groups:
Dataset2 |
---|
analysisId | operationId | operation_label | groupingId1 | grouping_label1name1 | groupId1 | group_label1name1 | groupingId2 | grouping_label2name2 | groupId2 | group_label2name2 | rawValue | formattedValue |
---|
An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_1_n | n | AnlsGrouping_01_Trt | Treatment | AnlsGrouping_01_Trt_1 | Placebo | AnlsGrouping_02_Sex | Sex | AnlsGrouping_02_Sex_1 | Male | 33 | 33 | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_1_n | n | AnlsGrouping_01_Trt | Treatment | AnlsGrouping_01_Trt_1 | Placebo | AnlsGrouping_02_Sex | Sex | AnlsGrouping_02_Sex_2 | Female | 53 | 53 | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_1_n | n | AnlsGrouping_01_Trt | Treatment | AnlsGrouping_01_Trt_2 | Xanomeline Low Dose | AnlsGrouping_02_Sex | Sex | AnlsGrouping_02_Sex_1 | Male | 34 | 34 | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_1_n | n | AnlsGrouping_01_Trt | Treatment | AnlsGrouping_01_Trt_2 | Xanomeline Low Dose | AnlsGrouping_02_Sex | Sex | AnlsGrouping_02_Sex_2 | Female | 50 | 50 | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_1_n | n | AnlsGrouping_01_Trt | Treatment | AnlsGrouping_01_Trt_3 | Xanomeline High Dose | AnlsGrouping_02_Sex | Sex | AnlsGrouping_02_Sex_1 | Male | 44 | 4444 | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_1_n | n | AnlsGrouping_01_Trt | Treatment | AnlsGrouping_01_Trt_3 | Xanomeline High Dose | AnlsGrouping_02_Sex | Sex | AnlsGrouping_02_Sex_2 | Female | 40 | 40 | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_2_pct | % | AnlsGrouping_01_Trt | Treatment | AnlsGrouping_01_Trt_1 | Placebo | AnlsGrouping_02_Sex | Sex | AnlsGrouping_02_Sex_1 | Male | 38.3720930232558 | ( 38.4) | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_2_pct | % | AnlsGrouping_01_Trt | Treatment | AnlsGrouping_01_Trt_1 | Placebo | AnlsGrouping_02_Sex | Sex | AnlsGrouping_02_Sex_2 | Female | 61.6279069767442 | ( 61.6) | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_2_pct | % | AnlsGrouping_01_Trt | Treatment | AnlsGrouping_01_Trt_2 | Xanomeline Low Dose | AnlsGrouping_02_Sex | Sex | AnlsGrouping_02_Sex_1 | Male | 40.4761904761905 | ( 40.5) | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_2_pct | % | AnlsGrouping_01_Trt | Treatment | AnlsGrouping_01_Trt_2 | Xanomeline Low Dose | AnlsGrouping_02_Sex | Sex | AnlsGrouping_02_Sex_2 | Female | 59.5238095238095 | ( 59.5) | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_2_pct | % | AnlsGrouping_01_Trt | Treatment | AnlsGrouping_01_Trt_3 | Xanomeline High Dose | AnlsGrouping_02_Sex | Sex | AnlsGrouping_02_Sex_1 | Male | 52.3809523809524 | ( 52.4) | An03_03_Sex_Summ_ByTrt | Mth01_CatVar_Summ_ByGrp_2_pct | % | AnlsGrouping_01_Trt | Treatment | AnlsGrouping_01_Trt_3 | Xanomeline High Dose | AnlsGrouping_02_Sex | Sex | AnlsGrouping_02_Sex_2 | Female | 47.6190476190476 | ( 47.6) |
|