Repository navigation
Round 15: studies across releases, spatial coverage, 2020 Census (v0.14.0) - #12
Merged
Merged
Conversation
…n fits spreg 1.9 prints the estimator class name from its summary code on every ML/GMM fit; stdout carries the MCP stdio protocol, so swallow it.
…nfo studies (Round 15 B1-B3) Spatial group, run in every full report and with --studies; info rows only (D15-1), not in REQUIRED_STUDIES. Per-(model, rho, scenario) and per-scenario seeds. Full configuration: 5.2 min and 2.5 min single-process.
…ns (Round 15 B3) ML lag rho intervals under-cover with outcome sampling error (0.48 / 0.003 at rho 0.3 / 0.6; GMM lag 0.90 / 0.89); lambda attenuated by both estimators; local Moran p_sim is folded, the BH default has little power and spatially patterned SEs give spurious clusters. Caveats go into the result notes and the workflow payload (local_notes); spatial_regression workflow exposes method (default unchanged). CHECK_MAP rows added.
…cit uncertainty semantics (Round 15 C1, C2) - dec/pl and dec/dhc dataset keys (product 'decennial'; DHC by default) through the existing client, cache, run_batch, outputs, codebook and replay; 2020 only; levels us/state/county/tract/block group/place, block for P.L. 94-171 and DHC H1 - archived 2020 variables/groups metadata (metadata/dec/); fetch script gains --datasets - N/NA variable suffixes (counts); 15-digit block GEOIDs - counts are not sample-based: no MOE/SE/CV columns, codebook Uncertainty column, metadata uncertainty record and moe_confidence_level null, disclosure-avoidance (TopDown) advisory with invariants and aggregation guidance - significance/CV/overlap tools refuse decennial-only tests; ACS vs decennial z-test treats the count as a fixed reference with a stated note; derive_estimate(product='decennial') returns point estimates only; analysis frames give counts NaN SE/CV and release dec_2020 - CLI --product, MCP dataset/product parameters, recipe decennial_counts
…und 15 C3) State population (P.L. 94-171 and DHC) vs the 2020 Apportionment Results Table 2; block housing units (invariant) summed to tract and county totals and compared block by block across files; DHC vs P.L. 94-171 for shared items at county and tract level. Exact equality. Fixtures for Michigan, New York and Wyoming (blocks and tracts in one county each), about 53 KB.
… live validation report (F1-F11 pass)
…te retrieval (Round 15 A1, A2)
- adjustments: several releases need dollar_year, price_index and rpp_years;
each release is converted to the dollar year with the price index (R-CPI-U-RS
default) first, then divided by the RPP of its own year (D15-2). create_manifest
fills omitted fields into <name>.completed.json before hashing. Run records CPI
values/factors, price-index and RPP table SHA-256s, RPP areas per release.
- replicates: {"source": "census_vre"} makes run_manifest fetch VRE files via
census.replicate.fetch_vre (and its cache); URLs and file SHA-256s go into
run.json and bundle.json; variables without published replicates are listed
(replicates.unavailable). Supplying replicates as well is an error; overlapping
releases are refused; not combinable with aggregation.
- analyses: replicate_scope "covariates_only" (fit_replicate, hashed) holds the
outcome fixed in refits instead of blocking under the strict policy;
fit_replicate gains fixed_variables.
- formulas may name GEOID and Year (C(Year) contrasts releases).
- Methods text states the adjustment order and the VRE source.
…024 (Round 15 A3) Pre-registered CPI+RPP-adjusted mean household income (B19025/B19001, both on the VRE list) change with Census VRE replicates fetched by run_manifest. Frozen-fixture offline test (trimmed API responses and VRE rows), live test gated by CENSUS_LIVE_TESTS=1, case study section 8 and recipe update.
…ion local Moran's I Owner decision after the Round 15 B studies. spatial_regression: method defaults per model (DEFAULT_METHODS: lag gm, error ml); ML lag stays available with LAG_ML_CAVEAT. local_morans: p_value = min(1, 2 p_sim) (sided='two'), 9999 permutations, BH at alpha 0.10; sided='folded' with permutations=999 restores the previous behavior. Caveats carry the re-run numbers.
… new and previous defaults spatial_regression_coverage marks the default estimator per model ([tool default], tool_default). local_morans_size calls local_morans with its new defaults and with the previous ones on every map (1000 reps per scenario). CHECK_MAP and README describe the new defaults.
…LISA (owner decisions)
- Overlapping releases are refused for any replicate source: validation for census_vre or an analysis declaring replicates required; caller-supplied replicates spanning overlapping releases stop replicate analyses with a blocking replicates_overlapping_releases deviation. The methods text claims independent samples only for non-overlapping 5-year periods. - validate_manifest/create_manifest return errors for malformed variables and derivations instead of raising. - census_vre at per-state VRE levels (tract, block group) needs explicit states; an empty VRE call list raises a clear error (replicates_unavailable). - replicate_scope covariates_only is allowed for registry-listed outcomes; create_manifest notes it and the run holds the outcome fixed as declared, recording covariates_only_outcome_had_replicates. - An empty frame (exclusions removed every unit) passes through adjustments. - _fill_adjustment_defaults uses latest_rpp_year; manifest_releases helper; boolean releases rejected.
…ct aliases - is_decennial_count no longer treats any *_count column without an MOE as a 2020 Census count. Evidence: codes in the archived 2020 dec/pl or dec/dhc metadata, frame attrs set by the decennial extraction (run_batch now sets product/dataset/variable_codes on decennial panels; kept in Parquet), the extraction metadata next to a CSV output, or analysis_frame(decennial=True). Ordinary columns such as crime_count keep SE 0 / no_sampling_error. - Decennial frames: counts are default variables and resolve by base code (P1_001 -> P1_001N or its _count slug); release is dec_2020 for decennial-only frames. - is_decennial no longer accepts the generic words 'census' and 'dec'; plan_extraction says which dataset keys to use instead of calling 'dec' an ACS dataset.
… process-wide stdout spreg 1.9 prints the estimator class name from spreg.output.out_part_top on every fit. contextlib.redirect_stdout around each fit swapped sys.stdout for every thread; instead shadow print in the spreg.output module once (drops what would reach stdout, forwards other files). Tests: no stdout from any of the four estimators with replicate refits, and sys.stdout is never swapped.
… levels, covariates_only on listed outcomes
Full --gate --jobs 0: PASS, 19 min; existing coverage rows unchanged; new spatial info rows.
…0-char budget holds on Python < 3.13; shorten run_manifest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See PLAN_ROUND_15.md section 6 and the CHANGELOG 0.14.0 entry.
Local: full suite 1090 passed, 36 skipped; full gate PASS (19 min).