anonymous-submission-acl2025's picture
add 17
8a79f2e

The experiment_specs folder provides detailed input specifications for the data pipeline. We keep configurations in /lib, instead of /data because they may be called by other modules, including

  1. study_config defines a bunch of specific parameters for the data pipeline, including:
  • detailed characteristics of each survey, and how the phases and surveys are connected
  • certain assertions related to the number observations that should be in the final data set
  • labelling a few special variables
  1. ManualCodebookSpecs.xlsx: set for manual variable naming, and labelling. Notice that all values are PREFIX AGNOSTIC... i.e. don't include "B_" in the variable name The file has the following columns:

    • VariableName: The variable name that will appear in the final codebook (data/final/ExpandedCodebook.csv). This must be entered.

    • VariableLabel: The variable label that will appear in the final codebook. If this is left empty, and if the variable comes from a survey, then the original question will be the variable label. There are 5 macros you can include in a manual label. Suppose we had the variable B_DailyPhoneUse, since the variable has the Baseline prefix B, the macros will equal:

      • [PrevSurvey] = Recruitment
      • [Survey] = Baseline
      • [NextSurvey] = Midline
      • [OldPhase] = Pre-Study
      • [NewPhase] = Baseline Phase
      • to see a full specification of these macros for each survey, check out lib/temptetation_specs/label_code_dic.json
    • DataType: the the data type you want the variable values to be

    • RawVariableName: the raw survey variable name you want to rename

    • PrefixEncoding: The type of variable, it could equal Main(a variable that is specified once throughout the study, like AppCode), Survey (for survey variables), NewPhase (for variables that represent data in the next phase), or OldPhase (for variables that represent data in the previous phase). These values are used when creating the final labels, if no macros are specified in the Variable label. For example, if B_ActualUse is set to NewPhase, the study_config dictates that the BaselinePhase is the NewPhase, so the variable label will equal "Baseline Phase: Avg Daily Use".

    • If you leave a field blank in the ManualCodebookSpecs, then the default option for that field will be used

  2. value_labels.yaml - specifies how to encode certain categorical variables

  3. varsets.py - defines the outcome variabels associated with the indices used for midline stratification (applied in data/source/clean_master/management/midline_prep.py)

  4. FITSBY_apps.xlsx - matches the raw app names (from the PD data) with the FITSBY name