Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Running a New Analysis

Spencer Buja edited this page Jul 6, 2019 · 1 revision

Running a New Analysis

  1. Copy example/exampleDIDAnalysis.py script into a new file.
  2. Edit config.json by making sure the values are filled in correctly by looking at the definitions in the table below.
Explanation of Variables in config.json
Configuration Setting Name Definition
kpiFileName A string with the name of the file with the metrics you are tracking over time.
treatmentFileName A string with the name of the file marking when treated users first started using the product/"were treated".
identifierColName A string that uniquely identifies a user in kpiFileName and treatmentFileName.
firstTimestampColName A string that identifies when the user first started using the product in treatmentFileName.
kpiColName A string with the column name of the metric you are tracking in kpiFileName.
kpiTimestampColName A string that marks the day of each metric in kpiFileName. As mentioned in the "More Information section", this discrete unit of time is locked in as a day, but there is an opportunity to extend it to other time units.
filters An object where the keys are column names in kpiTimeStampColName and values are the values the analysis should filter around.
kpiAxisLabel A string that labels the y-axis in both the difference in differences analysis and parallel lines assumptions visualizations. Make sure to include units!
differenceInDifferencesTitle A string for the title of the difference in differences analysis visualization.
parallelLinesTitle A string for the title of the parallel lines assumption visualization.
kpiScalingFactor A number that scales the KPI of interest. This is useful for unit conversion. For example, the following factor scales a KPI in milliseconds to hours: 2.7777777777777776e-07. We get this number because there are 1000 milliseconds in a second, 60 seconds in a minute, 60 minutes in an hours, and . We then divide 1 by the product of all of these numbers (1/3,600,000) to get the example kpiScalingFactor of 2.7777777777777776e-07 in scientific notation. Set this to 1, if you don't want the KPI to be scaled.
Clone this wiki locally