# Paper-to-Code Mapping # ๋…ผ๋ฌธ 32๊ฐœ ๋ชจ๋“ˆ๊ณผ ์ฝ”๋“œ๋ฒ ์ด์Šค ์—ฐ๋™ ๋งต ## Module #14-16: Data Overview (๋ฐ์ดํ„ฐ ๊ฐœ๊ด€) ### #14: Context - Quantum Computing Industry **๋…ผ๋ฌธ ๋‚ด์šฉ:** ์–‘์ž์ปดํ“จํŒ… ์‚ฐ์—… ๋ฐฐ๊ฒฝ ์„ค๋ช… **์ฝ”๋“œ ์œ„์น˜:** - `src/features.py::consolidate_company_snapshots()` - Filter: `df[df.sector_fe == 'quantum']` **ํ…Œ์ŠคํŠธ:** ```python # test/unit/test_features.py def test_quantum_sector_filtering(): """Verify quantum sector companies are correctly identified""" ``` ### #15: Sample Construction **๋…ผ๋ฌธ ๋‚ด์šฉ:** ํ‘œ๋ณธ ๊ตฌ์„ฑ (์ถœ์ฒ˜/์ฝ”ํ˜ธํŠธ/ํ•„ํ„ฐ) **์ฝ”๋“œ ์œ„์น˜:** - `src/features.py::consolidate_company_snapshots()` - `src/features.py::engineer_features()` **์ƒ์„ฑ ์•„ํ‹ฐํŒฉํŠธ:** ๐Ÿ—„๏ธ ํ‘œ๋ณธ๊ตฌ์„ฑํ‘œ **ํ…Œ์ŠคํŠธ:** ```python # test/integration/test_sample_construction.py def test_sample_size_matches_paper(): """Verify final sample size matches paper Table X""" df = consolidate_company_snapshots('data/raw') assert len(df) == PAPER_REPORTED_N ``` ### #16: Variables Overview (E/L/V/F) **๋…ผ๋ฌธ ๋‚ด์šฉ:** - E: Early event (Series A at baseline) - L: Later success (Series B+ at endpoint) - V: Vagueness score - F: Flexibility (1 - is_hardware) **์ฝ”๋“œ ์œ„์น˜:** - `src/features.py::engineer_features()` - `src/vagueness_v2.py::StrategicVaguenessScorerV2` **์ƒ์„ฑ ์•„ํ‹ฐํŒฉํŠธ:** ๐Ÿ—„๏ธ ๋ณ€์ˆ˜์ •์˜ยท์š”์•ฝํ†ต๊ณ„ **ํ…Œ์ŠคํŠธ:** ```python # test/integration/test_variables.py def test_table_descriptive_stats(): """Generate Table X: Descriptive Statistics and compare with paper""" df = load_and_engineer_features() stats = df[['E', 'L', 'V', 'F']].describe() # Compare with paper-reported values ``` --- ## Module #17-22: Empirical Methodology (์‹ค์ฆ ๋ฐฉ๋ฒ•๋ก ) ### #17: Measurements **๋…ผ๋ฌธ ๋‚ด์šฉ:** V (vagueness), F (flexibility) ์ธก์ • ๋ฐฉ๋ฒ• **์ฝ”๋“œ ์œ„์น˜:** - `src/vagueness_v2.py::StrategicVaguenessScorerV2.score()` - `src/features.py::engineer_features()` (F = 1 - is_hardware) **ํ…Œ์ŠคํŠธ:** ```python # test/unit/test_vagueness.py def test_vagueness_measurement_validity(): """Validate vagueness scoring against hand-coded examples""" ``` ### #19: Identification Strategy **๋…ผ๋ฌธ ๋‚ด์šฉ:** ๋‚ด์ƒ์„ฑ ๋…ผ์˜, ์‹๋ณ„ ์ „๋žต **์ฝ”๋“œ ์œ„์น˜:** - `src/models.py` (์ฃผ์„ ์ฐธ์กฐ) - Controls selection logic **๋ฌธ์„œํ™”:** `docs/identification_strategy.md` ### #20: Main Specifications **๋…ผ๋ฌธ ๋‚ด์šฉ:** E ~ V (OLS), L ~ V ร— F (Logit) **์ฝ”๋“œ ์œ„์น˜:** - `src/models.py::run_HEV()` - H1 for E ~ V - `src/models.py::run_HLVF()` - H2 for L ~ V ร— F **์ƒ์„ฑ ์•„ํ‹ฐํŒฉํŠธ:** ๐Ÿ—„๏ธ T_MainSpecs **ํ…Œ์ŠคํŠธ:** ```python # test/integration/test_main_specs.py def test_h1_specification_matches_paper(): """Verify H1 formula matches paper equation (X)""" # Run model result = run_HEV(df) # Check formula includes correct controls assert 'z_V' in result.params ``` --- ## Module #23-27: Results (๊ฒฐ๊ณผ) ### #23: H1 - Early Funding Penalty **๋…ผ๋ฌธ ๋‚ด์šฉ:** Vagueness reduces early funding **์ฝ”๋“œ ์œ„์น˜:** - `src/models.py::test_h1_early_funding()` - OR `src/models.py::run_HEV()` (two-snapshot mode) **์ƒ์„ฑ ์•„ํ‹ฐํŒฉํŠธ:** ๐Ÿ–ผ๏ธ Fig2_EVF, ๐Ÿ—„๏ธ T1 **ํ…Œ์ŠคํŠธ:** ```python # test/integration/test_paper_results.py def test_table1_h1_results(): """Reproduce Table 1: H1 regression coefficients""" df = load_analysis_data() result = test_h1_early_funding(df) # Compare with paper-reported values (with tolerance) PAPER_COEF_VAGUENESS = -0.234 # From paper Table 1 PAPER_SE = 0.089 assert abs(result.params['z_vagueness'] - PAPER_COEF_VAGUENESS) < 0.01 assert abs(result.bse['z_vagueness'] - PAPER_SE) < 0.01 def test_figure2_evf_plot(): """Reproduce Figure 2: E-V-F relationship""" df = load_analysis_data() fig_path = plot_figure2_evf(df) # Check file exists and is non-trivial assert Path(fig_path).exists() assert Path(fig_path).stat().st_size > 10000 ``` ### #24: H2 - Later Success Benefit **๋…ผๆ–‡ ๅ†…ๅฎน:** Vagueness beneficial for later success (moderated by F) **์ฝ”๋“œ ์œ„์น˜:** - `src/models.py::test_h2_main_growth()` - OR `src/models.py::run_HLVF()` (two-snapshot mode) **์ƒ์„ฑ ์•„ํ‹ฐํŒฉํŠธ:** ๐Ÿ–ผ๏ธ Fig3_LVF, Fig4_STV, ๐Ÿ—„๏ธ T2 **ํ…Œ์ŠคํŠธ:** ```python def test_table2_h2_results(): """Reproduce Table 2: H2 logit regression""" df = load_analysis_data() result = test_h2_main_growth(df) # Main effect (vagueness) PAPER_COEF_MAIN = 0.456 assert abs(result.params['z_vagueness'] - PAPER_COEF_MAIN) < 0.01 # Interaction (vagueness ร— hardware) PAPER_COEF_INTERACTION = -0.321 interaction_param = [p for p in result.params.index if 'z_vagueness' in p and 'is_hardware' in p][0] assert abs(result.params[interaction_param] - PAPER_COEF_INTERACTION) < 0.01 ``` ### #25: H2a - Vร—F Interaction **๋…ผ๋ฌธ ๋‚ด์šฉ:** ์ƒํ˜ธ์ž‘์šฉ ํšจ๊ณผ (flexibility amplifies vagueness benefit) **์ฝ”๋“œ ์œ„์น˜:** Same as #24 **์ƒ์„ฑ ์•„ํ‹ฐํŒฉํŠธ:** ๐Ÿ–ผ๏ธ Fig3_LVF (interaction plot) **ํ…Œ์ŠคํŠธ:** ```python def test_figure3_interaction_plot(): """Reproduce Figure 3: Vร—F interaction visualization""" df = load_analysis_data() result = test_h2_main_growth(df) # Generate interaction plot fig_path = plot_figure3_interaction(df, result) # Visual regression test (compare with reference image) # assert image_similarity(fig_path, 'test/fixtures/fig3_reference.png') > 0.95 ``` ### #26: Mechanisms - Pivot/Learning **๋…ผ๋ฌธ ๋‚ด์šฉ:** ๋ฉ”์ปค๋‹ˆ์ฆ˜ ๋ถ„์„ (ํ”ผ๋ฒ— ๋นˆ๋„, ํ•™์Šต ์†๋„) **์ฝ”๋“œ ์œ„์น˜:** - โš ๏ธ **์ƒˆ๋กœ ์ž‘์„ฑ ํ•„์š”:** `src/models.py::test_mechanism_pivot()` **์ƒ์„ฑ ์•„ํ‹ฐํŒฉํŠธ:** ๐Ÿ—„๏ธ T_Mech **ํ…Œ์ŠคํŠธ:** ```python # test/unit/test_mechanisms.py def test_pivot_frequency_analysis(): """Mechanism: Companies with higher V pivot more frequently""" # TODO: Implement pivot detection logic # df['pivot_count'] = detect_pivots(df) # model = smf.ols('pivot_count ~ z_vagueness + controls', df).fit() # assert model.params['z_vagueness'] > 0 ``` ### #27: Robustness - Spec Curve **๋…ผ๋ฌธ ๋‚ด์šฉ:** ๊ฐ•๊ฑด์„ฑ ๊ฒ€์ฆ (์ŠคํŽ™ ์ปค๋ธŒ, ์•ˆ์ •์„ฑ) **์ฝ”๋“œ ์œ„์น˜:** - `src/multiverse.py` (already exists) **์ƒ์„ฑ ์•„ํ‹ฐํŒฉํŠธ:** ๐Ÿ—„๏ธ T_SpecCurve **ํ…Œ์ŠคํŠธ:** ```python # test/integration/test_robustness.py def test_specification_curve(): """Run multiverse analysis across 100+ specifications""" from multiverse import run_specification_curve results = run_specification_curve(df) # Check majority of specs support main hypothesis significant_positive = sum((r.params['z_vagueness'] > 0) & (r.pvalues['z_vagueness'] < 0.05) for r in results) assert significant_positive / len(results) > 0.8 # 80%+ support ``` --- ## Module #11-13: Conceptual Model (๊ฐœ๋…ํ‹€) ### #11: Framework (2ร—2) **๋…ผ๋ฌธ ๋‚ด์šฉ:** 2ร—2 framework (์‹œ๊ฐ„ร—๋ ˆ๋ฒจ) **์ƒ์„ฑ ์•„ํ‹ฐํŒฉํŠธ:** ๐Ÿ–ผ๏ธ Fig1_LV (conceptual figure) **์ฝ”๋“œ ์œ„์น˜:** Manual illustration (not code-generated) **๋ฌธ์„œํ™”:** `docs/conceptual_framework.md` ### #13: Hypotheses (H1/H2/H2a) **๋…ผ๋ฌธ ๋‚ด์šฉ:** ๊ฐ€์„ค ์ •์‹ํ™” **์ฝ”๋“œ ์œ„์น˜:** - Documented in `src/models.py` docstrings - Each hypothesis test function has detailed docstring **ํ…Œ์ŠคํŠธ:** ```python # test/meta/test_hypothesis_documentation.py def test_h1_docstring_matches_paper(): """Verify H1 docstring matches paper hypothesis statement""" import inspect from models import test_h1_early_funding docstring = inspect.getdoc(test_h1_early_funding) assert "vagueness reduces early funding" in docstring.lower() ``` --- ## Summary Table: Code-Paper Mapping | Module | ๋…ผ๋ฌธ ์„น์…˜ | ์ฝ”๋“œ ํŒŒ์ผ | ํ…Œ์ŠคํŠธ ํŒŒ์ผ | ์•„ํ‹ฐํŒฉํŠธ | ์ƒํƒœ | |--------|----------|----------|------------|---------|-----| | #14 | Context | features.py | test_features.py | - | โœ… | | #15 | Sample | features.py | test_sample_construction.py | ๐Ÿ—„๏ธํ‘œ๋ณธ๊ตฌ์„ฑ | โš ๏ธ | | #16 | Variables | features.py, vagueness_v2.py | test_variables.py | ๐Ÿ—„๏ธ์š”์•ฝํ†ต๊ณ„ | โš ๏ธ | | #17 | Measurements | vagueness_v2.py | test_vagueness.py | - | โœ… | | #20 | Specifications | models.py | test_main_specs.py | ๐Ÿ—„๏ธMainSpecs | โš ๏ธ | | #23 | H1 Results | models.py::test_h1 | test_paper_results.py | ๐Ÿ–ผ๏ธFig2, ๐Ÿ—„๏ธT1 | โš ๏ธ | | #24 | H2 Results | models.py::test_h2 | test_paper_results.py | ๐Ÿ–ผ๏ธFig3-4, ๐Ÿ—„๏ธT2 | โš ๏ธ | | #25 | Interaction | models.py::test_h2 | test_paper_results.py | ๐Ÿ–ผ๏ธFig3 | โš ๏ธ | | #26 | Mechanisms | models.py (new) | test_mechanisms.py | ๐Ÿ—„๏ธT_Mech | โŒ | | #27 | Robustness | multiverse.py | test_robustness.py | ๐Ÿ—„๏ธSpecCurve | โŒ | Legend: - โœ… = ์ฝ”๋“œ & ํ…Œ์ŠคํŠธ ์™„๋ฃŒ - โš ๏ธ = ์ฝ”๋“œ ์žˆ์Œ, ํ…Œ์ŠคํŠธ ํ•„์š” - โŒ = ์ฝ”๋“œ or ํ…Œ์ŠคํŠธ ๋ชจ๋‘ ํ•„์š”