← Back to the post
Interactive data dictionary

Difference-in-Differences with Geocoded Microdata: When Distance Defines Treatment

Replication data for the ring DiD tutorial — Linden & Rockoff (2008) home sales near sex-offender arrivals.

2
datasets
55
variables
170,239
home sales (raw)
9,092
analysis sales

Downloads

Each dataset is available as a labeled Stata .dta and its source file.

⇩ Download all data (ZIP)stata_codebook.do

DatasetGrainRowsStataSource
raw_datahome sale (transaction)170,239 × 51raw_data.dtaraw_data.csv
data_preparedhome sale (transaction)9,092 × 55data_prepared.dtadata_prepared.csv

Run stata_codebook.do in Stata once to attach long-form per-variable notes to the .dta files.

Load directly in code

Every file loads straight from GitHub (raw URLs). Swap the file name to load any dataset.

Stata

* Stata 14+ : `use` reads an https URL directly
global BASE "https://raw.githubusercontent.com/cmg777/starter-academic-v501/master/content/post/r_did_ring/data/"
use "${BASE}raw_data.dta", clear
describe
notes

Python

!pip install -q pyreadstat
import pandas as pd
BASE = "https://raw.githubusercontent.com/cmg777/starter-academic-v501/master/content/post/r_did_ring/data/"
df = pd.read_stata(BASE + "raw_data.dta")

# load every dataset at once
files = ["raw_data", "data_prepared"]
data = {f: pd.read_stata(BASE + f + ".dta") for f in files}

# pyreadstat (richest metadata) reads LOCAL files -> download first
import pyreadstat, urllib.request
urllib.request.urlretrieve(BASE + "raw_data.dta", "raw_data.dta")
df, meta = pyreadstat.read_dta("raw_data.dta")

Copy and paste this snippet in Google Colab app. https://colab.research.google.com/notebooks/empty.ipynb

R

# R : haven::read_dta auto-downloads an https URL
library(haven)
BASE <- "https://raw.githubusercontent.com/cmg777/starter-academic-v501/master/content/post/r_did_ring/data/"
df <- read_dta(paste0(BASE, "raw_data.dta"))

Overview & sources

Companion data for a hands-on R tutorial on the spatial (ring) difference-in-differences design, where the treatment is a point in space and distance to that point becomes the running variable that defines who is treated and who is control. The post reproduces and extends Linden & Rockoff's (2008) study of how a registered sex offender's arrival affects nearby home prices, comparing a parametric ring estimator (a one-line feols() regression of first-differenced log prices on a treated-ring indicator) against the data-driven nonparametric estimator of Butts (2023), which uses binsreg to trace a whole treatment-effect curve over distance. At the canonical 0.1-mile cutoff the parametric ring DiD returns −5.78 %, but moving the inner ring from 0.05 to 0.15 mile swings the estimate from −6.40 % to −4.21 % (a 52 % relative spread); the nonparametric estimator finds the effect concentrated within the first 300 feet (bin 1 at −20.6 %) and crossing zero at d ≈ 0.094 mile.

Two files. raw_data is the full Linden & Rockoff transaction file (one row per home sale; 170,239 North Carolina sales, of which 9,092 fall within 1/3 mile of an offender's eventual address). data_prepared is the analysis sample — the 9,092 sales in some offender's catchment area (offender == 1), with five derived fields added (distance rescaled to miles plus the post/pre flag, neighborhood×year strata, and days-to-arrival used by the estimators).

Data sources

SourceProvidesReference / URL
Linden &amp; Rockoff (2008)Original study and source data: North Carolina home transactions geocoded to registered-offender addressesLinden, L., & Rockoff, J. E. (2008). Estimates of the Impact of Crime Risk on Property Values from Megan's Laws. American Economic Review, 98(3), 1103–1127. https://www.aeaweb.org/articles?id=10.1257/aer.98.3.1103
Butts (2023)Replicated methodology (parametric &amp; nonparametric ring estimators) and the cleaned data archive used hereButts, K. (2023). JUE Insight: Difference-in-Differences with Geocoded Microdata. Journal of Urban Economics, 133, 103493. https://doi.org/10.1016/j.jue.2022.103493
Method referencesEstimators and conceptsCattaneo, Crump, Farrell & Feng (2024), On Binscatter, American Economic Review 114(5), 1488–1514; the fixest and binsreg R packages.

Cite this data

Please cite this dataset as follows.

APA

Mendez, C. (2026). Difference-in-Differences with Geocoded Microdata: When Distance Defines Treatment [Data set]. https://carlos-mendez.org/post/r_did_ring/

Linden, L., & Rockoff, J. E. (2008). Estimates of the Impact of Crime Risk on Property Values from Megan's Laws. American Economic Review, 98(3), 1103–1127.

BibTeX

@misc{mendez2026rdidring,
  author       = {Mendez, Carlos},
  title        = {Difference-in-Differences with Geocoded Microdata: When Distance Defines Treatment},
  year         = {2026},
  howpublished = {\url{https://carlos-mendez.org/post/r_did_ring/}},
  note         = {Data set}
}

@article{linden2008estimates,
  author  = {Linden, Leigh and Rockoff, Jonah E.},
  title   = {Estimates of the Impact of Crime Risk on Property Values from {Megan's} Laws},
  journal = {American Economic Review},
  volume  = {98}, number = {3}, pages = {1103--1127}, year = {2008}
}

Variable explorer search & filter all 55 variables

Type to filter by name or label, or use the chips to filter by type. Each row shows a mini distribution. Click a header to sort.

VariableTypeDistributionLabelDefinitionUnitsIn filesSource
AGE#continuousmin 0 | median 7 | max 30Building age at sale (years)Age of the home at the time of sale.yearsraw_data, data_preparedLinden & Rockoff (2008)
AIRCOND#dummyshare coded 1 = 0.933Air conditioning (1=yes)1 if the home has air conditioning, else 0.0/1raw_data, data_preparedLinden & Rockoff (2008)
BATHS#identifierNumber of bathroomsCount of bathrooms in the home.countraw_data, data_preparedLinden & Rockoff (2008)
BEDROOMS#identifierNumber of bedroomsCount of bedrooms in the home.countraw_data, data_preparedLinden & Rockoff (2008)
BQM1#identifierBuilding quality, part 1First component of the assessor building-quality grade (1-6).1-6raw_data, data_preparedLinden & Rockoff (2008)
BQM2#identifierBuilding quality, part 2Second component of the assessor building-quality grade (1-6).1-6raw_data, data_preparedLinden & Rockoff (2008)
CNTLBQM1_2#dummyshare coded 1 = 0.748Building-quality dummy: BQM1 == 21 if building-quality part 1 equals 2, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLBQM1_3#dummyshare coded 1 = 0.181Building-quality dummy: BQM1 == 31 if building-quality part 1 equals 3, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLBQM1_4#dummyshare coded 1 = 0.050Building-quality dummy: BQM1 == 41 if building-quality part 1 equals 4, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLBQM1_5#dummyshare coded 1 = 0.011Building-quality dummy: BQM1 == 51 if building-quality part 1 equals 5, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLBQM1_6#dummyshare coded 1 = 0.004Building-quality dummy: BQM1 == 61 if building-quality part 1 equals 6, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLHEIGHT_2#dummyshare coded 1 = 0.067Height dummy: HEIGHT == 1.51 if building height class is 1.5, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLHEIGHT_3#dummyshare coded 1 = 0.485Height dummy: HEIGHT == 21 if building height class is 2, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLHEIGHT_4#dummyshare coded 1 = 0.016Height dummy: HEIGHT == 31 if building height class is 3, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLHEIGHT_5#dummyshare coded 1 = 0.011Height dummy: HEIGHT == 81 if building height class is 8, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLHEIGHT_6#dummyshare coded 1 = 0.023Height dummy: HEIGHT == 91 if building height class is 9, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLWALL_10#dummyshare coded 1 = 0.004Wall dummy: WOOD SHINGLE1 if exterior wall is wood shingle, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLWALL_2#dummyshare coded 1 = 0.009Wall dummy: ASB SHNG/SDG1 if exterior wall is asbestos shingle/siding, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLWALL_3#dummyshare coded 1 = 0.011Wall dummy: CEDAR, RDWD1 if exterior wall is cedar/redwood, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLWALL_4#dummyshare coded 1 = 0.008Wall dummy: EXT PLYWOOD1 if exterior wall is exterior plywood, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLWALL_5#dummyshare coded 1 = 0.265Wall dummy: FACE BRICK1 if exterior wall is face brick, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLWALL_6#dummyshare coded 1 = 0.213Wall dummy: MASONITE1 if exterior wall is masonite, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLWALL_7#dummyshare coded 1 = 0.009Wall dummy: OTHER1 if exterior wall is other material, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLWALL_8#dummyshare coded 1 = 0.016Wall dummy: STUCCO HRDCT1 if exterior wall is stucco/hardcoat, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
CNTLWALL_9#dummyshare coded 1 = 0.077Wall dummy: WOOD ON SHTG1 if exterior wall is wood on sheathing, else 0 (hedonic control).0/1raw_data, data_preparedLinden & Rockoff (2008)
HEATED#continuousmin 296 | median 1.87e+03 | max 1.03e+04Heated area (sq ft)Heated floor area of the home.sq ftraw_data, data_preparedLinden & Rockoff (2008)
HEIGHT#continuousmin 1 | median 2 | max 9Building height / stories codeCoded number of stories / height class (1, 1.5, 2, 3, 8, 9).coderaw_data, data_preparedLinden & Rockoff (2008)
NEW#dummyshare coded 1 = 0.249New construction (1=yes)1 if the sale is of newly built property, else 0.0/1raw_data, data_preparedLinden & Rockoff (2008)
WALL#identifierExterior wall materialExterior wall-material category (e.g. ALUM,VINYL; FACE BRICK; WOOD SHINGLE).categoryraw_data, data_preparedLinden & Rockoff (2008)
amt_Price#continuousmin 5e+03 | median 1.67e+05 | max 9.99e+05Sale price (US$)Recorded sale price of the home.US$raw_data, data_preparedLinden & Rockoff (2008)
building_grade#identifierBuilding gradeAssessor construction-quality grade of the home.categoryraw_data, data_preparedLinden & Rockoff (2008)
close_offender#dummyshare coded 1 = 0.008Treated ring: within 0.1 mile (1=yes)1 if the home is in the inner treated ring (within 0.1 mile of the offender's address), else 0.0/1raw_data, data_preparedButts (2023)
close_post_move#dummyshare coded 1 = 0.004Treated x post interaction (ring-DiD term)Interaction close_offender x post_move; its coefficient is the parametric ring-DiD ATT.0/1raw_data, data_preparedButts (2023)
correction_term_dec_2004#continuousmin 1.05 | median 1.15 | max 1.35Price correction term (Dec 2004 base)Inflation-correction factor expressing prices in December-2004 dollars.factorraw_data, data_preparedLinden & Rockoff (2008)
cpi_value#continuousmin 142 | median 166 | max 184CPI value at saleConsumer Price Index value used to deflate sale prices.indexraw_data, data_preparedLinden & Rockoff (2008)
dist_post#continuousmin 0 | median 0 | max 1.11Distance x 10 x treated-post (derived)Distance interaction term used in the analysis sample.miles x 10data_preparedThis study (analysis sample)
distance#continuousmin 0 | median 0 | max 1Distance to offenderDistance from the home to the nearest offender's eventual address; zero if the home is in no offender's area. In data_prepared this is rescaled to miles (raw distance / 3).miles (prepared) / raw units (raw_data)raw_data, data_preparedLinden & Rockoff (2008)
geo_code#identifierCensus geo code (state-county-tract-block group)Census geography identifier: state, county, tract, block group.coderaw_data, data_preparedLinden & Rockoff (2008)
log_price#continuousmin 8.52 | median 12 | max 13.8Log sale priceNatural log of the home sale price (the regression outcome).log US$raw_data, data_preparedLinden & Rockoff (2008)
neighbor_year#identifierNeighborhood x year group IDGroup identifier for neighborhood crossed with sale year.group IDraw_data, data_preparedLinden & Rockoff (2008)
neighborhood#identifierNeighborhood codeAssessor neighborhood identifier (the clustering unit for SEs).coderaw_data, data_preparedLinden & Rockoff (2008)
offdays#continuousmin -730 | median 6 | max 730Days from sale to offender arrivalDays between the sale date and the offender's arrival date (negative = before arrival).daysdata_preparedThis study (analysis sample)
offender#dummyshare coded 1 = 0.053In an offender catchment (1=yes)1 if the home is within 1/3 mile of some offender's eventual address (i.e. enters the analysis sample); else 0.0/1raw_data, data_preparedLinden & Rockoff (2008)
offender_address_date#identifierDate offender arrivedDate the offender's address was published / the offender moved in.dateraw_data, data_preparedLinden & Rockoff (2008)
orig_distance#continuousmin 0 | median 0 | max 1Distance to offender (before 4-year window)Distance to the offender's address before limiting the sample to the 4-year arrival window.raw unitsraw_data, data_preparedLinden & Rockoff (2008)
parcel#identifierParcel ID numberUnique tax-parcel identifier for the property.stringraw_data, data_preparedLinden & Rockoff (2008)
post#identifierPre/Post labelString label of the period: 'Pre' (before arrival) or 'Post' (after arrival).Pre/Postdata_preparedThis study (analysis sample)
post_move#dummyshare coded 1 = 0.027Post-arrival sale (1=yes)1 if the sale closed after the offender's arrival, else 0 (pre-arrival).0/1raw_data, data_preparedButts (2023)
sale_date#identifierSale dateDate the home transaction closed.dateraw_data, data_preparedLinden & Rockoff (2008)
sale_month#identifierMonth of saleCalendar month in which the home transaction closed.1-12raw_data, data_preparedLinden & Rockoff (2008)
sale_year#yearYear of saleCalendar year in which the home transaction closed.yearraw_data, data_preparedLinden & Rockoff (2008)
srn#identifierOffender ID numberIdentifier of the registered offender whose catchment the home falls in.stringraw_data, data_preparedLinden & Rockoff (2008)
srn_year#identifierOffender x sale-year fixed-effect stratumNeighborhood (offender) crossed with sale year; the fixed-effect cell in the parametric model.stringdata_preparedThis study (analysis sample)
streetname#identifierStreet nameStreet on which the property is located.stringraw_data, data_preparedLinden & Rockoff (2008)
year_built#yearYear builtYear the property was constructed.yearraw_data, data_preparedLinden & Rockoff (2008)

Cross-file variable index

Which file each variable appears in (● = present).

Construction & formulas

The ring DiD reuses the textbook 2×2 difference-in-differences logic, but the treated and control groups are defined by distance to a treatment point rather than by policy assignment. The estimand is the average treatment effect among the treated, τ = E[ΔY | treated] − E[ΔY | control].

Distance bookkeeping: the raw distance column is rescaled to miles inside the analysis sample (distance / 3); dist_post = distance × 10 × close_post_move; offdays = sale_date − offender_address_date (days relative to arrival); srn_year = paste(srn, sale_year) is the neighborhood×year fixed-effect stratum; log_price = log(amt_Price).

The datasets

Switch datasets with the tabs. Each shows the full variable dictionary plus a sortable statistics table with mini distributions and data coverage.

expand to search (Ctrl/⌘+F) or print across all datasets

home sale (transaction)  170,239 × 51 · 1994-2004 · 170,239 North Carolina home sales

Panel key: parcel x sale_date · Source data; the 9,092 sales within 1/3 mile of an offender form the analysis sample.

Variable dictionary

VariableLabelDefinitionConstructionUnitsSourceCoverage
sale_month identifierMonth of saleCalendar month in which the home transaction closed.From the transaction record.1-12Linden & Rockoff (2008)
sale_year yearYear of saleCalendar year in which the home transaction closed.From the transaction record.yearLinden & Rockoff (2008)
cpi_value continuousCPI value at saleConsumer Price Index value used to deflate sale prices.From the transaction record (price-deflation series).indexLinden & Rockoff (2008)
correction_term_dec_2004 continuousPrice correction term (Dec 2004 base)Inflation-correction factor expressing prices in December-2004 dollars.Derived from the CPI series, base = December 2004.factorLinden & Rockoff (2008)
geo_code identifierCensus geo code (state-county-tract-block group)Census geography identifier: state, county, tract, block group.Geocoded census block-group code.codeLinden & Rockoff (2008)
parcel identifierParcel ID numberUnique tax-parcel identifier for the property.From the county property records.stringLinden & Rockoff (2008)
amt_Price continuousSale price (US$)Recorded sale price of the home.From the transaction record.US$Linden & Rockoff (2008)
sale_date identifierSale dateDate the home transaction closed.From the transaction record.dateLinden & Rockoff (2008)
year_built yearYear builtYear the property was constructed.From the county property records.yearLinden & Rockoff (2008)
HEATED continuousHeated area (sq ft)Heated floor area of the home.From the county property records.sq ftLinden & Rockoff (2008)
BATHS identifierNumber of bathroomsCount of bathrooms in the home.From the county property records.countLinden & Rockoff (2008)
BEDROOMS identifierNumber of bedroomsCount of bedrooms in the home.From the county property records.countLinden & Rockoff (2008)
neighborhood identifierNeighborhood codeAssessor neighborhood identifier (the clustering unit for SEs).From the county property records.codeLinden & Rockoff (2008)
distance continuousDistance to offenderDistance from the home to the nearest offender's eventual address; zero if the home is in no offender's area. In data_prepared this is rescaled to miles (raw distance / 3).Geocoded straight-line distance; the analysis sample rescales to miles via distance / 3.miles (prepared) / raw units (raw_data)Linden & Rockoff (2008)
srn identifierOffender ID numberIdentifier of the registered offender whose catchment the home falls in.Sex-offender registry record number.stringLinden & Rockoff (2008)
offender_address_date identifierDate offender arrivedDate the offender's address was published / the offender moved in.From the sex-offender registry.dateLinden & Rockoff (2008)
building_grade identifierBuilding gradeAssessor construction-quality grade of the home.From the county property records.categoryLinden & Rockoff (2008)
offender dummyIn an offender catchment (1=yes)1 if the home is within 1/3 mile of some offender's eventual address (i.e. enters the analysis sample); else 0.Flag derived from distance to nearest offender.0/1Linden & Rockoff (2008)
streetname identifierStreet nameStreet on which the property is located.From the county property records.stringLinden & Rockoff (2008)
BQM1 identifierBuilding quality, part 1First component of the assessor building-quality grade (1-6).From the county property records.1-6Linden & Rockoff (2008)
BQM2 identifierBuilding quality, part 2Second component of the assessor building-quality grade (1-6).From the county property records.1-6Linden & Rockoff (2008)
AIRCOND dummyAir conditioning (1=yes)1 if the home has air conditioning, else 0.From the county property records.0/1Linden & Rockoff (2008)
HEIGHT continuousBuilding height / stories codeCoded number of stories / height class (1, 1.5, 2, 3, 8, 9).From the county property records.codeLinden & Rockoff (2008)
WALL identifierExterior wall materialExterior wall-material category (e.g. ALUM,VINYL; FACE BRICK; WOOD SHINGLE).From the county property records.categoryLinden & Rockoff (2008)
AGE continuousBuilding age at sale (years)Age of the home at the time of sale.sale_year minus year_built.yearsLinden & Rockoff (2008)
NEW dummyNew construction (1=yes)1 if the sale is of newly built property, else 0.From the county property records.0/1Linden & Rockoff (2008)
orig_distance continuousDistance to offender (before 4-year window)Distance to the offender's address before limiting the sample to the 4-year arrival window.Geocoded distance, pre-windowing.raw unitsLinden & Rockoff (2008)
close_offender dummyTreated ring: within 0.1 mile (1=yes)1 if the home is in the inner treated ring (within 0.1 mile of the offender's address), else 0.Indicator distance <= 0.1 mile.0/1Butts (2023)
post_move dummyPost-arrival sale (1=yes)1 if the sale closed after the offender's arrival, else 0 (pre-arrival).Indicator that the sale date is after offender_address_date.0/1Butts (2023)
close_post_move dummyTreated x post interaction (ring-DiD term)Interaction close_offender x post_move; its coefficient is the parametric ring-DiD ATT.close_offender * post_move.0/1Butts (2023)
neighbor_year identifierNeighborhood x year group IDGroup identifier for neighborhood crossed with sale year.group(neighborhood, sale_year).group IDLinden & Rockoff (2008)
CNTLBQM1_2 dummyBuilding-quality dummy: BQM1 == 21 if building-quality part 1 equals 2, else 0 (hedonic control).Indicator BQM1 == 2.0/1Linden & Rockoff (2008)
CNTLBQM1_3 dummyBuilding-quality dummy: BQM1 == 31 if building-quality part 1 equals 3, else 0 (hedonic control).Indicator BQM1 == 3.0/1Linden & Rockoff (2008)
CNTLBQM1_4 dummyBuilding-quality dummy: BQM1 == 41 if building-quality part 1 equals 4, else 0 (hedonic control).Indicator BQM1 == 4.0/1Linden & Rockoff (2008)
CNTLBQM1_5 dummyBuilding-quality dummy: BQM1 == 51 if building-quality part 1 equals 5, else 0 (hedonic control).Indicator BQM1 == 5.0/1Linden & Rockoff (2008)
CNTLBQM1_6 dummyBuilding-quality dummy: BQM1 == 61 if building-quality part 1 equals 6, else 0 (hedonic control).Indicator BQM1 == 6.0/1Linden & Rockoff (2008)
CNTLWALL_2 dummyWall dummy: ASB SHNG/SDG1 if exterior wall is asbestos shingle/siding, else 0 (hedonic control).Indicator WALL == 'ASB SHNG/SDG'.0/1Linden & Rockoff (2008)
CNTLWALL_3 dummyWall dummy: CEDAR, RDWD1 if exterior wall is cedar/redwood, else 0 (hedonic control).Indicator WALL == 'CEDAR,RDWD'.0/1Linden & Rockoff (2008)
CNTLWALL_4 dummyWall dummy: EXT PLYWOOD1 if exterior wall is exterior plywood, else 0 (hedonic control).Indicator WALL == 'EXT PLYWOOD'.0/1Linden & Rockoff (2008)
CNTLWALL_5 dummyWall dummy: FACE BRICK1 if exterior wall is face brick, else 0 (hedonic control).Indicator WALL == 'FACE BRICK'.0/1Linden & Rockoff (2008)
CNTLWALL_6 dummyWall dummy: MASONITE1 if exterior wall is masonite, else 0 (hedonic control).Indicator WALL == 'MASONITE'.0/1Linden & Rockoff (2008)
CNTLWALL_7 dummyWall dummy: OTHER1 if exterior wall is other material, else 0 (hedonic control).Indicator WALL == 'OTHER'.0/1Linden & Rockoff (2008)
CNTLWALL_8 dummyWall dummy: STUCCO HRDCT1 if exterior wall is stucco/hardcoat, else 0 (hedonic control).Indicator WALL == 'STUCCO HRDCT'.0/1Linden & Rockoff (2008)
CNTLWALL_9 dummyWall dummy: WOOD ON SHTG1 if exterior wall is wood on sheathing, else 0 (hedonic control).Indicator WALL == 'WOOD ON SHTG'.0/1Linden & Rockoff (2008)
CNTLWALL_10 dummyWall dummy: WOOD SHINGLE1 if exterior wall is wood shingle, else 0 (hedonic control).Indicator WALL == 'WOOD SHINGLE'.0/1Linden & Rockoff (2008)
CNTLHEIGHT_2 dummyHeight dummy: HEIGHT == 1.51 if building height class is 1.5, else 0 (hedonic control).Indicator HEIGHT == 1.5.0/1Linden & Rockoff (2008)
CNTLHEIGHT_3 dummyHeight dummy: HEIGHT == 21 if building height class is 2, else 0 (hedonic control).Indicator HEIGHT == 2.0/1Linden & Rockoff (2008)
CNTLHEIGHT_4 dummyHeight dummy: HEIGHT == 31 if building height class is 3, else 0 (hedonic control).Indicator HEIGHT == 3.0/1Linden & Rockoff (2008)
CNTLHEIGHT_5 dummyHeight dummy: HEIGHT == 81 if building height class is 8, else 0 (hedonic control).Indicator HEIGHT == 8.0/1Linden & Rockoff (2008)
CNTLHEIGHT_6 dummyHeight dummy: HEIGHT == 91 if building height class is 9, else 0 (hedonic control).Indicator HEIGHT == 9.0/1Linden & Rockoff (2008)
log_price continuousLog sale priceNatural log of the home sale price (the regression outcome).log(amt_Price).log US$Linden & Rockoff (2008)

Distribution & statistics (click a header to sort)

VariableDistributionCoverageNDistinctMinMeanMedianMaxSD
sale_month100%170,23912
sale_year100%170,2391119941999.5200020043.11
cpi_valuemin 142 | median 166 | max 184100%170,239112142.5165.2166.5183.711.29
correction_term_dec_2004min 1.05 | median 1.15 | max 1.35100%170,2391121.051.171.151.350.081
geo_code100%170,239375
parcel100%170,239121,834
amt_Pricemin 5e+03 | median 1.67e+05 | max 9.99e+05100%170,23958,2125,003.3204,837167,009998,596132,447
sale_date100%170,2392,938
year_built100%170,23910519001984.21993200419.53
HEATEDmin 296 | median 1.87e+03 | max 1.03e+04100%170,2394,949296.02,069.61,874.010,274872.0
BATHS100%170,2396
BEDROOMS100%170,2399
neighborhood100%169,588905
distancemin 0 | median 0 | max 1100%170,2397,97600.03401.0000.154
srn23%38,840333
offender_address_date23%38,840287
building_grade100%170,21836
offendershare coded 1 = 0.053100%170,239200.05301.000.225
streetname100%170,23910,682
BQM1100%170,2186
BQM2100%170,2186
AIRCONDshare coded 1 = 0.933100%170,239200.9331.001.000.250
HEIGHTmin 1 | median 2 | max 9100%170,22961.001.812.009.001.39
WALL100%170,23910
AGEmin 0 | median 7 | max 30100%170,23931011.477.0030.0011.88
NEWshare coded 1 = 0.249100%170,239200.24901.000.432
orig_distancemin 0 | median 0 | max 1100%170,23927,49000.14801.0000.296
close_offendershare coded 1 = 0.008100%170,239200.00801.000.089
post_moveshare coded 1 = 0.027100%170,239200.02701.000.162
close_post_moveshare coded 1 = 0.004100%170,239200.00401.000.065
neighbor_year100%169,5887,720
CNTLBQM1_2share coded 1 = 0.748100%170,218200.7481.001.000.434
CNTLBQM1_3share coded 1 = 0.181100%170,218200.18101.000.385
CNTLBQM1_4share coded 1 = 0.050100%170,218200.05001.000.218
CNTLBQM1_5share coded 1 = 0.011100%170,218200.01101.000.104
CNTLBQM1_6share coded 1 = 0.004100%170,218200.00401.000.060
CNTLWALL_2share coded 1 = 0.009100%170,239200.00901.000.095
CNTLWALL_3share coded 1 = 0.011100%170,239200.01101.000.105
CNTLWALL_4share coded 1 = 0.008100%170,239200.00801.000.089
CNTLWALL_5share coded 1 = 0.265100%170,239200.26501.000.441
CNTLWALL_6share coded 1 = 0.213100%170,239200.21301.000.409
CNTLWALL_7share coded 1 = 0.009100%170,239200.00901.000.092
CNTLWALL_8share coded 1 = 0.016100%170,239200.01601.000.124
CNTLWALL_9share coded 1 = 0.077100%170,239200.07701.000.267
CNTLWALL_10share coded 1 = 0.004100%170,239200.00401.000.064
CNTLHEIGHT_2share coded 1 = 0.067100%170,229200.06701.000.251
CNTLHEIGHT_3share coded 1 = 0.485100%170,229200.48501.000.500
CNTLHEIGHT_4share coded 1 = 0.016100%170,229200.01601.000.126
CNTLHEIGHT_5share coded 1 = 0.011100%170,229200.01101.000.103
CNTLHEIGHT_6share coded 1 = 0.023100%170,229200.02301.000.151
log_pricemin 8.52 | median 12 | max 13.8100%170,23956,4388.5212.0612.0313.810.586

home sale (transaction)  9,092 × 55 · 1994-2004 · 9,092 sales within 1/3 mile of an offender

Panel key: parcel x sale_date (within srn_year strata) · Estimate the ring DiD (parametric & nonparametric) on the real Linden-Rockoff data.

Variable dictionary

VariableLabelDefinitionConstructionUnitsSourceCoverage
sale_month identifierMonth of saleCalendar month in which the home transaction closed.From the transaction record.1-12Linden & Rockoff (2008)
sale_year yearYear of saleCalendar year in which the home transaction closed.From the transaction record.yearLinden & Rockoff (2008)
cpi_value continuousCPI value at saleConsumer Price Index value used to deflate sale prices.From the transaction record (price-deflation series).indexLinden & Rockoff (2008)
correction_term_dec_2004 continuousPrice correction term (Dec 2004 base)Inflation-correction factor expressing prices in December-2004 dollars.Derived from the CPI series, base = December 2004.factorLinden & Rockoff (2008)
geo_code identifierCensus geo code (state-county-tract-block group)Census geography identifier: state, county, tract, block group.Geocoded census block-group code.codeLinden & Rockoff (2008)
parcel identifierParcel ID numberUnique tax-parcel identifier for the property.From the county property records.stringLinden & Rockoff (2008)
amt_Price continuousSale price (US$)Recorded sale price of the home.From the transaction record.US$Linden & Rockoff (2008)
sale_date identifierSale dateDate the home transaction closed.From the transaction record.dateLinden & Rockoff (2008)
year_built yearYear builtYear the property was constructed.From the county property records.yearLinden & Rockoff (2008)
HEATED continuousHeated area (sq ft)Heated floor area of the home.From the county property records.sq ftLinden & Rockoff (2008)
BATHS identifierNumber of bathroomsCount of bathrooms in the home.From the county property records.countLinden & Rockoff (2008)
BEDROOMS identifierNumber of bedroomsCount of bedrooms in the home.From the county property records.countLinden & Rockoff (2008)
neighborhood identifierNeighborhood codeAssessor neighborhood identifier (the clustering unit for SEs).From the county property records.codeLinden & Rockoff (2008)
distance continuousDistance to offenderDistance from the home to the nearest offender's eventual address; zero if the home is in no offender's area. In data_prepared this is rescaled to miles (raw distance / 3).Geocoded straight-line distance; the analysis sample rescales to miles via distance / 3.miles (prepared) / raw units (raw_data)Linden & Rockoff (2008)
srn identifierOffender ID numberIdentifier of the registered offender whose catchment the home falls in.Sex-offender registry record number.stringLinden & Rockoff (2008)
offender_address_date identifierDate offender arrivedDate the offender's address was published / the offender moved in.From the sex-offender registry.dateLinden & Rockoff (2008)
building_grade identifierBuilding gradeAssessor construction-quality grade of the home.From the county property records.categoryLinden & Rockoff (2008)
offender dummyIn an offender catchment (1=yes)1 if the home is within 1/3 mile of some offender's eventual address (i.e. enters the analysis sample); else 0.Flag derived from distance to nearest offender.0/1Linden & Rockoff (2008)
streetname identifierStreet nameStreet on which the property is located.From the county property records.stringLinden & Rockoff (2008)
BQM1 identifierBuilding quality, part 1First component of the assessor building-quality grade (1-6).From the county property records.1-6Linden & Rockoff (2008)
BQM2 identifierBuilding quality, part 2Second component of the assessor building-quality grade (1-6).From the county property records.1-6Linden & Rockoff (2008)
AIRCOND dummyAir conditioning (1=yes)1 if the home has air conditioning, else 0.From the county property records.0/1Linden & Rockoff (2008)
HEIGHT continuousBuilding height / stories codeCoded number of stories / height class (1, 1.5, 2, 3, 8, 9).From the county property records.codeLinden & Rockoff (2008)
WALL identifierExterior wall materialExterior wall-material category (e.g. ALUM,VINYL; FACE BRICK; WOOD SHINGLE).From the county property records.categoryLinden & Rockoff (2008)
AGE continuousBuilding age at sale (years)Age of the home at the time of sale.sale_year minus year_built.yearsLinden & Rockoff (2008)
NEW dummyNew construction (1=yes)1 if the sale is of newly built property, else 0.From the county property records.0/1Linden & Rockoff (2008)
orig_distance continuousDistance to offender (before 4-year window)Distance to the offender's address before limiting the sample to the 4-year arrival window.Geocoded distance, pre-windowing.raw unitsLinden & Rockoff (2008)
close_offender dummyTreated ring: within 0.1 mile (1=yes)1 if the home is in the inner treated ring (within 0.1 mile of the offender's address), else 0.Indicator distance <= 0.1 mile.0/1Butts (2023)
post_move dummyPost-arrival sale (1=yes)1 if the sale closed after the offender's arrival, else 0 (pre-arrival).Indicator that the sale date is after offender_address_date.0/1Butts (2023)
close_post_move dummyTreated x post interaction (ring-DiD term)Interaction close_offender x post_move; its coefficient is the parametric ring-DiD ATT.close_offender * post_move.0/1Butts (2023)
neighbor_year identifierNeighborhood x year group IDGroup identifier for neighborhood crossed with sale year.group(neighborhood, sale_year).group IDLinden & Rockoff (2008)
CNTLBQM1_2 dummyBuilding-quality dummy: BQM1 == 21 if building-quality part 1 equals 2, else 0 (hedonic control).Indicator BQM1 == 2.0/1Linden & Rockoff (2008)
CNTLBQM1_3 dummyBuilding-quality dummy: BQM1 == 31 if building-quality part 1 equals 3, else 0 (hedonic control).Indicator BQM1 == 3.0/1Linden & Rockoff (2008)
CNTLBQM1_4 dummyBuilding-quality dummy: BQM1 == 41 if building-quality part 1 equals 4, else 0 (hedonic control).Indicator BQM1 == 4.0/1Linden & Rockoff (2008)
CNTLBQM1_5 dummyBuilding-quality dummy: BQM1 == 51 if building-quality part 1 equals 5, else 0 (hedonic control).Indicator BQM1 == 5.0/1Linden & Rockoff (2008)
CNTLBQM1_6 dummyBuilding-quality dummy: BQM1 == 61 if building-quality part 1 equals 6, else 0 (hedonic control).Indicator BQM1 == 6.0/1Linden & Rockoff (2008)
CNTLWALL_2 dummyWall dummy: ASB SHNG/SDG1 if exterior wall is asbestos shingle/siding, else 0 (hedonic control).Indicator WALL == 'ASB SHNG/SDG'.0/1Linden & Rockoff (2008)
CNTLWALL_3 dummyWall dummy: CEDAR, RDWD1 if exterior wall is cedar/redwood, else 0 (hedonic control).Indicator WALL == 'CEDAR,RDWD'.0/1Linden & Rockoff (2008)
CNTLWALL_4 dummyWall dummy: EXT PLYWOOD1 if exterior wall is exterior plywood, else 0 (hedonic control).Indicator WALL == 'EXT PLYWOOD'.0/1Linden & Rockoff (2008)
CNTLWALL_5 dummyWall dummy: FACE BRICK1 if exterior wall is face brick, else 0 (hedonic control).Indicator WALL == 'FACE BRICK'.0/1Linden & Rockoff (2008)
CNTLWALL_6 dummyWall dummy: MASONITE1 if exterior wall is masonite, else 0 (hedonic control).Indicator WALL == 'MASONITE'.0/1Linden & Rockoff (2008)
CNTLWALL_7 dummyWall dummy: OTHER1 if exterior wall is other material, else 0 (hedonic control).Indicator WALL == 'OTHER'.0/1Linden & Rockoff (2008)
CNTLWALL_8 dummyWall dummy: STUCCO HRDCT1 if exterior wall is stucco/hardcoat, else 0 (hedonic control).Indicator WALL == 'STUCCO HRDCT'.0/1Linden & Rockoff (2008)
CNTLWALL_9 dummyWall dummy: WOOD ON SHTG1 if exterior wall is wood on sheathing, else 0 (hedonic control).Indicator WALL == 'WOOD ON SHTG'.0/1Linden & Rockoff (2008)
CNTLWALL_10 dummyWall dummy: WOOD SHINGLE1 if exterior wall is wood shingle, else 0 (hedonic control).Indicator WALL == 'WOOD SHINGLE'.0/1Linden & Rockoff (2008)
CNTLHEIGHT_2 dummyHeight dummy: HEIGHT == 1.51 if building height class is 1.5, else 0 (hedonic control).Indicator HEIGHT == 1.5.0/1Linden & Rockoff (2008)
CNTLHEIGHT_3 dummyHeight dummy: HEIGHT == 21 if building height class is 2, else 0 (hedonic control).Indicator HEIGHT == 2.0/1Linden & Rockoff (2008)
CNTLHEIGHT_4 dummyHeight dummy: HEIGHT == 31 if building height class is 3, else 0 (hedonic control).Indicator HEIGHT == 3.0/1Linden & Rockoff (2008)
CNTLHEIGHT_5 dummyHeight dummy: HEIGHT == 81 if building height class is 8, else 0 (hedonic control).Indicator HEIGHT == 8.0/1Linden & Rockoff (2008)
CNTLHEIGHT_6 dummyHeight dummy: HEIGHT == 91 if building height class is 9, else 0 (hedonic control).Indicator HEIGHT == 9.0/1Linden & Rockoff (2008)
log_price continuousLog sale priceNatural log of the home sale price (the regression outcome).log(amt_Price).log US$Linden & Rockoff (2008)
dist_post continuousDistance x 10 x treated-post (derived)Distance interaction term used in the analysis sample.distance * 10 * close_post_move (distance in miles).miles x 10This study (analysis sample)
post identifierPre/Post labelString label of the period: 'Pre' (before arrival) or 'Post' (after arrival).ifelse(post_move == 1, 'Post', 'Pre').Pre/PostThis study (analysis sample)
srn_year identifierOffender x sale-year fixed-effect stratumNeighborhood (offender) crossed with sale year; the fixed-effect cell in the parametric model.paste(srn, sale_year, sep = '-').stringThis study (analysis sample)
offdays continuousDays from sale to offender arrivalDays between the sale date and the offender's arrival date (negative = before arrival).as.numeric(sale_date - offender_address_date).daysThis study (analysis sample)

Distribution & statistics (click a header to sort)

VariableDistributionCoverageNDistinctMinMeanMedianMaxSD
sale_month100%9,09212
sale_year100%9,0921119942001.0200120042.25
cpi_valuemin 145 | median 172 | max 184100%9,092106145.0170.3171.6183.78.12
correction_term_dec_2004min 1.05 | median 1.12 | max 1.32100%9,0921061.051.131.121.320.055
geo_code100%9,092210
parcel100%9,0927,979
amt_Pricemin 5.41e+03 | median 1.33e+05 | max 9.93e+05100%9,0927,1155,408.5143,814133,250992,50684,801
sale_date100%9,0922,078
year_built100%9,09210319001975.91983200424.20
HEATEDmin 540 | median 1.49e+03 | max 5.97e+03100%9,0921,959540.01,603.81,492.05,974.0598.2
BATHS100%9,0926
BEDROOMS100%9,0926
neighborhood100%9,092253
distancemin 0.00929 | median 0.224 | max 0.333100%9,0927,9750.0090.2120.2240.3330.082
srn100%9,092174
offender_address_date100%9,092166
building_grade100%9,08630
offendershare coded 1 = 1.000100%9,09211.001.001.001.000
streetname100%9,0921,628
BQM1100%9,0866
BQM2100%9,0866
AIRCONDshare coded 1 = 0.832100%9,092200.8321.001.000.374
HEIGHTmin 1 | median 1 | max 9100%9,09261.001.721.009.001.64
WALL100%9,09210
AGEmin 0 | median 18 | max 30100%9,09231016.8618.0030.0012.79
NEWshare coded 1 = 0.180100%9,092200.18001.000.385
orig_distancemin 0.0279 | median 0.671 | max 1100%9,0927,9750.0280.6350.6711.0000.245
close_offendershare coded 1 = 0.148100%9,092200.14801.000.355
post_moveshare coded 1 = 0.505100%9,092200.5051.001.000.500
close_post_moveshare coded 1 = 0.080100%9,092200.08001.000.271
neighbor_year100%9,092975
CNTLBQM1_2share coded 1 = 0.896100%9,086200.8961.001.000.305
CNTLBQM1_3share coded 1 = 0.066100%9,086200.06601.000.248
CNTLBQM1_4share coded 1 = 0.012100%9,086200.01201.000.110
CNTLBQM1_5share coded 1 = 0.003100%9,086200.00301.000.052
CNTLBQM1_6share coded 1 = 0.000100%9,086204.40e-0401.000.021
CNTLWALL_2share coded 1 = 0.019100%9,092200.01901.000.136
CNTLWALL_3share coded 1 = 0.002100%9,092200.00201.000.048
CNTLWALL_4share coded 1 = 0.015100%9,092200.01501.000.123
CNTLWALL_5share coded 1 = 0.277100%9,092200.27701.000.448
CNTLWALL_6share coded 1 = 0.165100%9,092200.16501.000.371
CNTLWALL_7share coded 1 = 0.008100%9,092200.00801.000.087
CNTLWALL_8share coded 1 = 0.005100%9,092200.00501.000.071
CNTLWALL_9share coded 1 = 0.118100%9,092200.11801.000.323
CNTLWALL_10share coded 1 = 0.007100%9,092200.00701.000.086
CNTLHEIGHT_2share coded 1 = 0.054100%9,092200.05401.000.226
CNTLHEIGHT_3share coded 1 = 0.313100%9,092200.31301.000.464
CNTLHEIGHT_4share coded 1 = 0.006100%9,092200.00601.000.076
CNTLHEIGHT_5share coded 1 = 0.015100%9,092200.01501.000.120
CNTLHEIGHT_6share coded 1 = 0.033100%9,092200.03301.000.179
log_pricemin 8.6 | median 11.8 | max 13.8100%9,0927,0518.6011.7311.8013.810.563
dist_postmin 0 | median 0 | max 1.11100%9,09266600.05901.110.211
post100%9,0922
srn_year100%9,092717
offdaysmin -730 | median 6 | max 730100%9,0921,453-730.0-6.666.00730.0402.0

Known limitations & caveats