# Replication Package

---

## Overview

This replication package contains all code necessary to reproduce the tables and figures in the paper. The package is organized into two main components: (1) **Build**, which constructs the analysis datasets from raw data sources, and (2) **Analysis**, which produces all tables and figures reported in the paper.

---

## Software Requirements

The replication code uses three software environments:

- **Stata** (version 16 or later). The following user-written packages are required and can be installed via `ssc install` or `net install`:
  
  - `reghdfe` — high-dimensional fixed effects estimation
  - `outreg2`, `estout` — regression output formatting
  - `winsor2` — winsorization
  - `matchit` — fuzzy string matching
  - `binscatter` — binned scatter plots
  - `coefplot` — coefficient plots

- **Python** (version 3.7 or later). The following packages are required:
  
  - `pandas`, `numpy`, `requests`, `beautifulsoup4`, `nltk`, `multiprocessing`

- **R** (version 4.0 or later). The following packages are required:
  
  - `data.table`, `dplyr`, `dtplyr`, `stringr`, `lubridate`, `glue`
  - `udpipe`, `textrank`, `readr`
  - `parallel`, `doParallel`, `foreach`, `writexl`, `readxl`

---

## Code Description

### Step 1 — Data Construction (`Build/Data Construction/`)

These five scripts must be run in order. They process raw data from each source and merge them into a single county-quarter working dataset.

| Script                           | Description                                                                                                                                                                                                                                                                |
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `1_build.do`                     | Converts new business registration data from place-level to county-level using a place-to-county crosswalk. Also incorporates SBA loan data.                                                                                                                               |
| `2_IPO.do`                       | Processes the SDC IPO database. Geocodes IPO firm headquarters to county FIPS codes using ZIP codes, city names, and state identifiers. Converts SIC codes to NAICS.                                                                                                       |
| `3_Public_Firm_Num.do`           | Constructs a county-year panel of the number of public firms using Compustat/CRSP data, matched to county locations via ZIP codes.                                                                                                                                         |
| `4_Merge_County_IPO_Issuance.do` | Master merge script. Combines business registration, IPO events, public firm counts, income per capita (BEA), county population (Census), and Google Trends entrepreneurship search volume into the main county-quarter working dataset (`workingdata_county_issue_date`). |
| `5_Birth_Clean.do`               | Cleans and prepares establishment birth data from the Census Bureau for use in the industry-level analysis.                                                                                                                                                                |

### Step 2 — Regression Sample Construction (`Build/Regression Sample Construction/`)

These scripts take the working dataset from Step 1 and construct the specific regression samples used in each part of the analysis. Scripts 1–5 produce datasets directly used in the final analysis. Script 6 constructs a supplementary media coverage dataset.

| Script                                | Output Dataset                      | Used In                                |
| ------------------------------------- | ----------------------------------- | -------------------------------------- |
| `1.stack_3yr_construction.do`         | `reg_data_stack_3yr`                | Tables 5, 7, 9, 10; Figures 3, 4       |
| `2.stack_3yr_construction_both.do`    | `reg_data_stack_3yr_both_final`     | Tables 1, 2, 3, 6, 8; Figure 3         |
| `3.stack_3yr_cty_ind_construction.do` | `reg_data_stack_3yr_ind`            | Table 4                                |
| `4.stack_3yr_ps_match.do`             | `reg_data_stack_3yr_match3`         | Robustness checks                      |
| `5.QCEW_uncertainty.do`               | `uncertainty_90_16_vol`             | Tables 5, 10; Figure 4                 |
| `6.key_development.do`                | `reg_data_stack_3yr_fail_new_media` | Supplementary (media coverage measure) |

**Stacked difference-in-differences design.** Scripts 1–3 implement a stacked DiD design in which each IPO event defines its own "clean" comparison group of counties that never receive an IPO within the event window. The `_both` variant (script 2) includes withdrawn IPOs as an additional group.

### Step 2b — EDGAR and S1 Filing Data (`Build/Regression Sample Construction/Edgar_Crunchbase/`)

**`edgar_crunchbase_data.do`** (Stata)  
   Produces two final datasets:
   
   - **`edgar_03_17.dta`**: County-quarter counts of EDGAR filing downloads (S-1, 10-K, 10-Q, 8-K, etc.) from geocoded SEC server logs, 2003–2017. Used in Tables 6B to test whether IPOs increase local information-seeking in general.
   - **`crunchbase_data_yq.dta`**: County-quarter counts of EDGAR downloads originating specifically from startup organizations, identified by fuzzy-matching IP-address owners in the server logs to Crunchbase company names. Used in Table 7 to test whether the information-seeking effect is concentrated among entrepreneurs.

**S1** (`Build/Regression Sample Construction/Edgar_Crunchbase/S1`)

Follow a separate ReadMe file in the folder.

### Step 3 — Analysis (`Analysis/`)

| Script                      | Description                                                                                                                                                                                  |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `BCHKL_regression_final.do` | Produces all tables and figures in the paper. Uses the datasets from Steps 1–2b as inputs. All output is written to `Output/Regression_Final.xlsx` and separate image files for each figure. |

**Tables and their data sources:**

| Table / Figure                           | Dataset(s) Used                                                        |
| ---------------------------------------- | ---------------------------------------------------------------------- |
| Table 1 (Summary Statistics)             | `reg_data_stack_3yr_both_final`, `workingdata_county_issue_date`       |
| Table 2 (Main Results)                   | `reg_data_stack_3yr_both_final`                                        |
| Table 3 (Bernstein IV)                   | `reg_data_stack_3yr_both_final`, `SDC_ipo_data`                        |
| Table 4 (Establishment Births)           | `reg_data_stack_3yr_ind`                                               |
| Table 5 (Placebo: Uncertainty)           | `reg_data_stack_3yr`, `uncertainty_90_16_vol`                          |
| Table 6 (Entrepreneurial Interest)       | `reg_data_stack_3yr_both_final`, `edgar_03_17`                         |
| Table 7 (Entrepreneur EDGAR Searches)    | `reg_data_stack_3yr`, `crunchbase_data_yq`                             |
| Table 8 (S-1 Text Characteristics)       | `reg_data_stack_3yr_both_final`, `SDC_ipo_data`, `S1_Filings_0412.csv` |
| Table 9 (Spinoffs vs. Private-to-Public) | `reg_data_stack_3yr`                                                   |
| Table 10 (Uncertainty Interaction)       | `reg_data_stack_3yr`, `uncertainty_90_16_vol`                          |
| Figure 1 (IPO Map)                       | `SDC_ipo_data`                                                         |
| Figure 2 (New Business Map)              | `workingdata_county_issue_date`                                        |
| Figure 3 (Event Study)                   | `reg_data_stack_3yr_both_final`                                        |
| Figure 4 (Binscatter, PCA composite)     | `reg_data_stack_3yr_both_final`, `uncertainty_90_16_vol`               |

*Note: Log file paths in all scripts are retained from the original working environment for record-keeping purposes. Replicators will need to update these paths to reflect their local directory structure before running the code.*

---

## Data Sources

The following data sources are required to run the replication code. The data are not included in this package and must be obtained independently.

| Data                           | Source                                                                      | Variables Used                                                                                                                 |
| ------------------------------ | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| IPO data                       | Thomson Reuters SDC Platinum                                                | Filing date, issue date, withdrawal date, issuer name, ZIP code, CUSIP, SIC code, NASDAQ return at filing (`nasdaq_ret_build`) |
| New business registrations     | New business registrations Data                                             | County-quarter count of new business registrations                                                                             |
| Establishment births           | U.S. Census Bureau, Statistics of U.S. Businesses (SUSB)                    | County-industry-year count of establishment births                                                                             |
| Public firm locations          | Compustat / CRSP                                                            | Firm headquarters address, ZIP code, fiscal year; matched using CRSP `stock_header` file                                       |
| Income per capita              | U.S. Bureau of Economic Analysis (BEA)                                      | County-year personal income per capita, 1969–2018                                                                              |
| County population              | U.S. Census Bureau                                                          | County-year population, 1970–2017                                                                                              |
| Payroll and employment         | Bureau of Labor Statistics, Quarterly Census of Employment and Wages (QCEW) | County-quarter private-sector payroll and employment, used to construct volatility measures                                    |
| Entrepreneurship search volume | Google Trends                                                               | DMA-quarter search volume index for entrepreneurship-related terms                                                             |
| EDGAR server logs              | SEC EDGAR full-index / log files                                            | IP address, date, CIK, form type, number of documents downloaded, 2003–2017                                                    |
| IP geolocation                 | MaxMind GeoLite / commercial database                                       | IP-address-to-county mapping                                                                                                   |
| S-1 filing texts               | SEC EDGAR Archives                                                          | Full text of S-1 registration statements, accessed via EDGAR filing index                                                      |
| Startup organizations          | Crunchbase                                                                  | Organization name, city, state, country, for US companies                                                                      |
| Key developments (media)       | Capital IQ Key Developments                                                 | Company-level news events, 1988–2018 (used in supplementary analysis`)                                                         |

---

## Data Source to Table and Figure Mapping

The table below cross-references each original external data source with the paper outputs it contributes to.

| Original Data                                                   | Tables and Figures                 |
| --------------------------------------------------------------- | ---------------------------------- |
| IPO data (Thomson Reuters SDC Platinum)                         | Tables 1–10; Figures 1–4           |
| New business registrations                                      | Tables 1–3, 5–6, 8–10; Figures 2–4 |
| Establishment births (U.S. Census Bureau, SUSB)                 | Table 4                            |
| Public firm locations (Compustat / CRSP)                        | Tables 1–10; Figures 3, 4          |
| Income per capita (U.S. Bureau of Economic Analysis)            | Tables 1–10; Figures 3, 4          |
| County population (U.S. Census Bureau)                          | Tables 1–10; Figures 2–4           |
| Payroll and employment (Bureau of Labor Statistics, QCEW)       | Tables 5, 10; Figure 4             |
| Entrepreneurship search volume (Google Trends)                  | Table 6                            |
| EDGAR server logs (SEC EDGAR full-index / log files)            | Tables 6, 7                        |
| IP geolocation (MaxMind GeoLite / commercial database)          | Tables 6, 7                        |
| S-1 filing texts (SEC EDGAR Archives)                           | Table 8                            |
| Startup organizations (Crunchbase)                              | Table 7                            |
| Key developments / media coverage (Capital IQ Key Developments) | Supplementary analysis             |

---

## Sample Identifiers

In accordance with JAR's data and code sharing policy (Item 6), we provide the identifiers
for the final IPO sample used in the analysis. The file `IPO_CUSIP.csv` lists the CUSIP
identifiers of the sample IPO firms drawn from Refinitiv's SDC New Issues database (first
quarter of 1988 through fourth quarter of 2016), after applying the sample screens described
in the paper (excluding financial firms [SIC 6000–6999], unit offerings, closed-end funds
including REITs, ADRs, limited partnerships, SPACs, and spin-offs). These identifiers allow
other researchers to reconstruct the IPO sample from a licensed SDC subscription.

The final sample comprises **11,039 IPO events**, which includes both completed and withdrawn
IPOs. The withdrawn IPOs enter as an additional event group in the stacked difference-in-differences
design (see `2.stack_3yr_construction_both.do`). This reconciles with the build log
`Build/Data Construction/2_IPO.log`, which reports 10,734 geocoded *completed* IPOs before the
withdrawn IPOs are added; the full count of 11,039 events appears in the stacked-sample logs
(`Build/Regression Sample Construction/1.stack_3yr_construction.log` and
`2.stack_3yr_construction_both.log`).

---

## Data Retention

In accordance with JAR's data and code sharing policy (Item 8) and consistent with National
Science Foundation guidelines, the corresponding author will maintain the data and programs
used in this study for at least six years following publication.
