This example shows the specification of an analysis method that contains 2 operations, 1 of which is a dependent operation. The definitions of 2 analyses are also included, 1 of which is an analysis that uses the example method and the other is the analysis that produces some of the results used by the dependent operation.

Lines 2-32:

Show the "Summary by group of a categorical variable" analysis method, which contains 2 operations:

  • Lines 8-12: Show the definition of the "Count of subjects" operation.
  • Lines 13-32: Show the definition of the "Percent of subjects" operation, which is a dependent operation; it references the results of 2 other operations to act as the numerator and denominator in the calculation of the percentage:
    • Lines 19-25: Show the definition of the referenced operation relationship that specifies that the results of the operation identified as "Mth01_CatVar_Summ_ByGrp_1_n" (line 22) act as the numerator (lines 20-21) in the calculation of the percentage. The analysisId attribute is not included, which indicates that the referenced analysis identifier differs depending on the analysis that uses this operation (so this referenced analysis identifier must be specified in the definition of any analysis that uses this operation). The description (lines 23-25) indicates the type of analysis that can provide the numerator for the calculation.
    • Lines 26-32: Show the definition of the referenced operation relationship that specifies that the results of the operation identified as "Mth01_CatVar_Count_ByGrp_1_n" (line 29) act as the denominator (lines 27-28) in the calculation of the percentage. Again, the analysisId attribute is not included, which indicates that the referenced analysis identifier differs depending on the analysis that performs this operation (so this referenced analysis identifier must also be specified in the definition of any analysis that uses this operation). The description (lines 30-32) indicates the type of analysis that can provide the denominator for the calculation.
Lines 35-45:

Show the definition of the "Summary of Subjects by Treatment" analysis, which is identified as "An01_05_SAF_Summ_ByTrt". This analysis definition is included in the example because it uses the method identified as "Mth01_CatVar_Count_ByGrp", which contains the referenced operation that provides the denominator for the calculation of the percentage, as described above and referenced as "Mth01_CatVar_Count_ByGrp_1_n" on line 27. The definition of the method identified as "Mth01_CatVar_Count_ByGrp" is shown in Example 1 in the AnalysisMethod section.

Lines 46-65:

Show the definition of "Summary of Subjects by Treatment and Age Group" analysis, which is identified as "An03_02_AgeGrp_Summ_ByTrt" (line 46) and includes 2 referenced analysis operations:

  • Lines 61-62: Show that the analysis identified as "An03_02_AgeGrp_Summ_ByTrt" (line 62)—i.e., this same analysis—provides the results used as the numerator in the "Percent of subjects" operation (as specified in the referenced operation relationship identified as "Mth01_CatVar_Summ_ByGrp_2_pct_NUM" (line 61) whose definition is shown on lines 19-25). 
  • Lines 63-64: Show that the analysis identified as "An01_05_SAF_Summ_ByTrt" (line 64)—i.e., the analysis defined on lines 35-45—provides the results used as the denominator in the "Percent of subjects" operation (as specified in the referenced operation relationship identified as "Mth01_CatVar_Summ_ByGrp_2_pct_DEN" (line 63) whose definition is shown on lines 26-32). 

YAML Example
methods:
- id: Mth01_CatVar_Summ_ByGrp
  name: Summary by group of a categorical variable  
  description: Descriptive summary statistics across groups for a categorical variable,
    based on subject occurrence
  label: Grouped summary of 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)
    referencedOperationRelationships:
    - id: Mth01_CatVar_Summ_ByGrp_2_pct_NUM
      referencedOperationRole:
        controlledTerm: NUMERATOR
      operationId: Mth01_CatVar_Summ_ByGrp_1_n
      description: The count operation whose result provides the numerator for calculation
        of the percentage. The referenced analysis should be the analysis that contains
        this percent operation.
    - id: Mth01_CatVar_Summ_ByGrp_2_pct_DEN
      referencedOperationRole:
        controlledTerm: DENOMINATOR
      operationId: Mth01_CatVar_Count_ByGrp_1_n
      description: The count operation whose result provides the denominator for calculation
        of the percentage. The referenced analysis should have the same analysis set
        and grouping(s) as the analysis containing this percent operation.
  ...
analyses:
- id: An01_05_SAF_Summ_ByTrt
  version: 1
  name: Summary of Subjects by Treatment
  methodId: Mth01_CatVar_Count_ByGrp
  dataset: ADSL
  variable: USUBJID
  analysisSetId: AnalysisSet_02_SAF
  orderedGroupings:
  - order: 1
    resultsByGroup: true
    groupingId: AnlsGrouping_01_Trt
- id: An03_02_AgeGrp_Summ_ByTrt
  version: 1
  name: Summary of Subjects by Treatment and Age Group
  methodId: Mth01_CatVar_Summ_ByGrp
  dataset: ADSL
  variable: USUBJID
  analysisSetId: AnalysisSet_02_SAF
  orderedGroupings:
  - order: 1
    resultsByGroup: true
    groupingId: AnlsGrouping_01_Trt
  - order: 2
    resultsByGroup: true
    groupingId: AnlsGrouping_03_AgeGp
  referencedAnalysisOperations:
  - referencedOperationRelationshipId: Mth01_CatVar_Summ_ByGrp_2_pct_NUM
    analysisId: An03_02_AgeGrp_Summ_ByTrt
  - referencedOperationRelationshipId: Mth01_CatVar_Summ_ByGrp_2_pct_DEN
    analysisId: An01_05_SAF_Summ_ByTrt
  ...
...
  • No labels