First, change the first line of "within_replicate.do" so the local variable "path" is set to the correct file pathway.

Second, ensure that the data files "tract_stats.csv", "DEC_00_SF1_G001_with_ann.csv", "DEC_00_SF1_G001_with_ann_1.csv", "DEC_00_SF3_DP3_with_ann.csv", "DEC_00_SF3_DP3_with_ann_1.csv", "assess_census.csv", "qcew.csv" and "13287-00228-Data.txt" are saved in that directory.

To produce the estimates for the tables and figures, run "within_replicate.do" using Stata.

Some of the analysis in this paper uses proprietary data provided by Black Knight Inc.  Tables 2, 6 and parts of Table 3 are therefore omitted from the above code (and the data to create them is not provided) as I do not have license to share these data.  Interested researchers can contact Black Knight to purchase the data.  The data is currently accessible to researchers in the Federal Reserve System. For transparency, the code used to generate the summary statistics for the McDash data and estimates in Table 6 is provided in "within_default_replicate.do"

This paper makes use of Home Mortgage Disclosure Act (HMDA) data from the years 1999-2008.  The full HMDA data over this time span takes up approximately half a terabyte of diskspace.  Consequently, I am providing an intermediate data set consisting of a number of fields at the census tract level, calculated from the original micro data.  This intermediate data set ("assess_census.csv") is used by the "within_replicate.do" code to produce summary statistics in Table 3 and estimates for Table 4 and Figures 3 and 4.  I provide code ("mortgages_replicate.do") that interested researchers can use to recreate "assess_ncdb2.dta" from the underlying HMDA micro data.  Instructions for obtaining HMDA data are available here: https://www.ffiec.gov/hmda/nationalarchives.htm

In addition to the HMDA data, assess_census also uses tract-specific census data to identify area median family income put together by the FFIEC.  Data can be found here: https://www.ffiec.gov/censusproducts.htm

The number of banks including each tract in their assessment areas in a given year can be calculated by summing up the instances in which each tract appears in a reporting bank's list of assessment areas.  These data are available at https://www.ffiec.gov/cra/craflatfiles.htm.  The code used in this paper runs off of the raw version of the data which is confidential supervisory information.  The file "redefine_replicate.do" creates the number of banks including each tract in their assessment areas (and the MSA-level aggregates for the instrument) from these data. Interested researchers can modify this code as appropriate to replicate the procedure using the public versions of the files.