Model Documentation

The AnalysisOutputProgrammingCode class may be used to specify programming code statements and/or parameter values for either analyses or outputs. It is used in the programmingCode attribute of either:

  • The Analysis class, to indicate the programming code statements and/or parameter values used to perform a specific analysis, or
  • The Output class, to indicate the programming code and, optionally, parameter values used to produce the results included in a specific output.

ER Diagram: AnalysisOutputProgrammingCode

The ARS AnalysisOutputProgrammingCode class corresponds with the arm:ProgrammingCode element specified in ARM for Define-XML:

ARS AnalysisOutputProgrammingCode

Attributes

Corresponding ARM for Define-XML

arm:ProgrammingCode Attributes/Elements

contextContext attribute
codearm:Code element
documentRefdef:DocumentRef element

The programming statements used to produce the results for analyses or outputs may be provided in 1 of 3 ways:

  1. by storing the statements directly in the code attribute of the AnalysisOutputProgrammingCode class; 
  2. by referencing a programming code document in the documentRef attribute of the AnalysisOutputProgrammingCode class (see the DocumentReference section for more information about programming code document references); or
  3. for analyses only, by implied reference to template programming code associated with the analysis method specified in the methodId attribute of the Analysis class (see the AnalysisProgrammingCodeTemplate section for more information about template programming code).

Provision of programming code for analyses or outputs is not required; sponsors may choose to include programming code to support their regulatory or operational requirements. In general, when programming code is provided, it will be provided either for analyses or for outputs. When programming code is provided for outputs, or for analyses whose analysis method does not have associated template programming code (i.e., template programming code is not specified in the codeTemplate attribute of the instance of the AnalysisMethod class referenced in the methodId attribute of the analysis), programming statements should be provided either directly or via a programming code document reference (option 1 or 2). When programming statements are provided directly or via a document reference:

  • The context attribute is used to specify the name and version of the computer language used for the programming statements.
  • Output- or analysis-specific programming code parameter values may also be specified in the parameters attribute of the AnalysisOutputProgrammingCode class.

If the analysis method for an analysis has associated template programming code (i.e., template programming code is specified in the codeTemplate attribute of the instance of the AnalysisMethod class referenced in the methodId attribute of the analysis), sponsors may choose to implement the template programming code in different ways. The template programming code may be used to generate executable, analysis-specific programming code statements which are then stored as part of the definition of the analysis (using the code or documentRef attribute of the AnalysisOutputProgrammingCode class; option 1 or 2 above). Alternatively, if the template programming code is already executable or generation of executable programming statements is implemented at runtime, the template programming code may be implemented by reference only (option 3). If template programming code is implemented by reference only, none of the context, code or documentRef attributes of the AnalysisOutputProgrammingCode class is used: the programmingCode attribute of the analysis is either not used, or it is used only to specify analysis-specific parameter values in the parameters attribute of the AnalysisOutputProgrammingCode class.

The parameters attribute of the AnalysisOutputProgrammingCode class may be used to specify one or more output- or analysis-specific programming code parameter value. Each parameter value is specified as an instance of the AnalysisOutputCodeParameter class, which includes the name, description, label, and value attributes to specify, respectively, the name, description, label, and (single) value of the parameter. The value attribute contains the parameter value used during either execution of parameterized, analysis- or output-specific programming code, or (for analyses whose method has associated parameterized template programming code) generation of analysis-specific programming code. For more information about the use of parameters with template programming code, including examples, see the AnalysisProgrammingCodeTemplate section.

The provision of programming code, the implementation of any template programming code and the use of programming code parameters should be consistent within any given reporting event.

Example

This example shows programming code specified for 1 analysis and 1 output. In both cases the context attribute shows "SAS Version 9.4" as the name and version of the computer language used for the programming code statements.

Lines 2-10:

Show the "Comparison of Age by Treatment" analysis with the programming code statements provided directly in the code attribute.

Lines 14-19:

Show the "Summary of TEAE by System Organ Class and Preferred Term" output, where programming code statements are provided by reference to the programming code document identified as "at14-5-01_sas".

YAML Example
analyses:
- name: Comparison of Age by Treatment
  id: An03_01_Age_Comp_ByTrt
  programmingCode:
    context: SAS Version 9.4
    code: 'proc glm data=ADSL;
      class TRT01A;
      model AGE=TRT01A;
      ods output OverallANOVA=results.ANOVAGE (where=(source = ''Model''));
      run;'
  ...
...
outputs: 
- id: Out14-3-2-1
  name: Summary of TEAE by System Organ Class and Preferred Term
  programmingCode:
    context: SAS Version 9.4
    documentRef:
      referenceDocumentId: at14-5-01_sas
  ...
...

Example

This example shows parameterized programming code for the "Comparison of Age Group by Treatment" analysis specified directly in the code attribute, with the values used at runtime for the 3 parameters specified in the parameters attribute.
YAML Example
analyses:
- id: An03_02_AgeGrp_Comp_ByTrt
  name: Comparison of Age Group by Treatment
  programmingCode:
    context: SAS Version 9.4
    code: 'proc freq data=&ANDS;
      table &GRPVAR * &ANVAR / chisq;
      exact pchi; 
      run;'
    parameters:
    - name: ANDS
      description: Analysis dataset
      value: ADSL
    - name: GRPVAR
      description: Grouping variable
      value: TRT01A
    - name: ANVAR
      description: Analysis variable
      value: AGEGRP
   ...
...

  • No labels