1 minute read

6.3 Creating analysis variables: A case study from the Demand for Safe Spaces project

BOX 6.3 CREATING ANALYSIS VARIABLES: A CASE STUDY FROM THE DEMAND FOR SAFE SPACES PROJECT

The header of the script that created analysis variables for the crowdsourced data in the Demand for Safe Spaces study is shown below. It started from a pooled data set that combined all waves of data collection. The variable was constructed after all waves had been pooled to make sure that all variables were constructed identically across all waves.

1 /**************************************************************************************** 2 * Demand for "Safe Spaces": Avoiding Harassment and Stigma * 3 * Construct analysis variables * 4 *****************************************************************************************

5 6 REQUIRES: ${dt_final}/pooled_rider_audit_rides.dta 7 ${dt_final}/pooled_rider_audit_exit.dta 8 ${doc_rider}/pooled/codebooks/label-constructed-data.xlsx 9 10 CREATES: ${dt_final}/pooled_rider_audit_constructed_full.dta 11 ${dt_final}/pooled_rider_audit_constructed.dta 12 13 WRITEN BY: Luiza Andrade, Kate Vyborny, Astrid Zwager 14

15 OVERVIEW: 1 Load and merge data 16 2 Construct new variables

17 3 Recode values 18 4 Keep only variables used for analysis 19 5 Save full data set

20 6 Save paper sample 21 22 ****************************************************************************************/

For the full construction do-file, visit the GitHub repository at https://git.io/JtgY5. For the do-file in which data from all waves are pooled, visit the GitHub repository at https://git.io/JtgYA.

Documenting variable construction

Because variable construction involves translating concrete observed data points into measures of abstract concepts, it is important to document exactly how each variable is derived or calculated. Careful documentation is linked closely to the research principles discussed in chapter 1. It makes research decisions transparent, allowing someone to look up how each variable was defined in the analysis and what the reasoning was behind these decisions. By reading the documentation, persons who are not familiar with the project should be able to understand the contents of the analysis data sets, the steps taken to create them, and the decision-making process. Ideally, they should

This article is from: