RDP 2024-02: Valuing Safety and Privacy in Retail Central Bank Digital Currency Read me file

This ‘read me’ file contains details of the code and data used in RDP-2024-02.

The code was run on STATA version 16.1.

Data sources

Consumer Payments Survey data

Data for each wave of the Consumer Payments Survey (CPS) are held in the Payments Policy Department of the Reserve Bank of Australia. The CPS dataset contains unit record data. Survey respondents participated on the basis that their personal data would be kept confidential. It is therefore not possible to provide unit record data to the public.

Web search data

Although the data for Figure 3 is not provided it can be obtained from Google Trends (https://www.google.com/trends).

Figure data

‘rdp-2024-02-graph-data.xlsx’ contains the publicly available data used to plot the figures in the paper in an Excel format.

Replication instructions

The replication files are split into two folders: ‘INTERNAL_ONLY’ and ‘PUBLIC’. Only the ‘PUBLIC’ folder will have files in it. The ‘INTERNAL_ONLY’ folder is reproduced here without the confidential CPS data files as it is referenced from the STATA programs. The replication programs are in the ‘PUBLIC/Programs’ sub-folder.

To reproduce the analysis, execute all STATA programs through the STATA project ‘rdp-2024-02-supplementary-information.stpr’ in the top level folder. The programs should be executed in numeric order, or the 0_RUN_ALL file can be executed to run all the files in the correct order.

There are three dependencies that need to be installed before executing the programs: coefplot, outreg2 and estout. These can be installed using the following code:

  • ssc install coefplot
  • ssc install outreg2
  • ssc install estout

Program descriptions

1. 0_RUN_ALL.do
Summary: Prompts the user to install any packages not yet installed and executes all the programs in order. It deletes all working files once the code is finished running.
Inputs: None.
Outputs: None.
2. 1_data_cleaning.do
Summary: Imports and cleans the raw CPS data, generating the variables used in the regressions.
Inputs: INTERNAL_ONLY/Data/CPS_Cash_Use_Shares.csv
  INTERNAL_ONLY/Data/CPS_2022.xlsx
Outputs: INTERNAL_ONLY/Outputs/Figure_4_Data.csv
  INTERNAL_ONLY/Data/Working Data/data_1_master_clean.dta
3. 2_regressions.do
Summary: Estimates regression models 1, 2 and 3, and generates willingness-to-pay estimates from regression outputs.
Inputs: INTERNAL_ONLY/Data/Working Data/data_1_master_clean.dta
Outputs: INTERNAL_ONLY/Outputs/Model_1_2.rtf (and .txt)
  INTERNAL_ONLY/Outputs/Model_1_4.rtf (and .txt)
  INTERNAL_ONLY/Outputs/Model_Appendix.rtf (and .txt)
  INTERNAL_ONLY/Outputs/Figure_1_Data.csv
  INTERNAL_ONLY/Outputs/Figure_5_Data.csv
  INTERNAL_ONLY/Outputs/Figure_6_Data.csv
  INTERNAL_ONLY/Outputs/Figure_7_Data.csv
4. 3_data_quality.do
Summary: Tests for randomisation balance and attrition bias.
Inputs: INTERNAL_ONLY/Data/Working Data/data_1_master_clean.dta
  INTERNAL_ONLY/Data/Tables_Data_Quality_Report.xlsx
Outputs: INTERNAL_ONLY/Outputs/Figure_2_Data.csv
  INTERNAL_ONLY/Outputs/Figure_A1_Data.csv

11 April 2024

Back to abstract