Add research report on the joint g-computation refactor#78
Merged
Conversation
A 2,800-word standalone writeup at inst/validation/method_refactor_report.md documenting the methodological refactor delivered by PRs #66-#77. Structured as introduction / methods / results / discussion + references + reproducibility section. Sections cover: - Intro: ARTnet's role in EpiModelHIV-p; the marginal-vs-joint problem the legacy univariate approach exposed; the ARTnetPredict motivation for fixing the within-ARTnet baseline before forward projection. - Methods: the three new arguments (`method`, `duration.method`, `target_pop`); per-layer joint Poisson + binomial + Gaussian + log-linear fits; g-computation aggregation in build_netstats; the cross-sectional age-of-extant-ties target for dissolution; the validation infrastructure (snapshot harness, method comparison, GHA CI). - Results: 229/363 cells (63%) shift > 5% across four scenarios; worst shifts on dissolution durations in matched-and-old strata (-47%), one-time nodematch in older age groups (-51%), and high-deg.main casual nodefactor (+40%); decomposition of the -15% Atlanta main-edges shift attributed to ARTnet's 80.7% White vs Atlanta's 51.5% Black composition; coefficient strengthening on deg.casl (-0.24 -> -0.55), hiv2 (+0.09 -> +0.25), age slope, and the AIC-selected age:deg.casl interaction; end-to-end ERGM convergence with netdx |Z| <= 2.05 across 1000 sims. - Discussion: implications for EpiModelHIV-p simulations (Atlanta-specific models over-target main edges by 15%); three explicit limitations (geometric tergm dissolution can't honor Weibull k != 1, length-bias and 5-truncation in formation stats not yet addressed in #72, joint_lm uses ongoing partnerships only); ARTnetPredict's three unblocked next steps (corrected 2017-18 baseline, 2022-24 AMIS projection via target_pop data.frame, NHBS post-stratification as a one-line argument); methods paper outline. Numbers cited are spot-checked against the committed inst/validation/method_comparison.md to ensure the report and the machine-generated comparison agree. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
A standalone ~2,800-word writeup documenting the joint g-computation refactor that the package shipped via PRs #66 through #77. Lives at
inst/validation/method_refactor_report.md, parallel to the machine-generated comparison reportmethod_comparison.md.Structured as a research report:
method,duration.method,target_pop); per-layer joint GLMs (Poisson, binomial, Gaussian, log-linear) with AIC-based interaction selection; g-computation aggregation inbuild_netstats; the deliberate choice that durations target mean age of extant ties at cross-section rather than mean full partnership duration (Steve Goodreau's framing in Length-biased sampling and 5-partnership truncation bias in formation target stats #72); validation infrastructuredeg.casl(−0.24 → −0.55),hiv2(+0.09 → +0.25); end-to-end ERGM convergence verifiedk ≠ 1, length-bias and 5-truncation not yet addressed in Length-biased sampling and 5-partnership truncation bias in formation target stats #72,joint_lmuses ongoing-only); ARTnetPredict's three unblocked next steps; outline for a methods paperNumbers cited spot-checked against the committed
inst/validation/method_comparison.mdfor consistency. No code changes; documentation-only PR.Test plan
inst/validation/method_comparison.mdAfter this lands, the
inst/validation/directory holds:validate_backward_compat.R+ snapshots — backward-compat regression infrastructuremethod_comparison.R+method_comparison.md— automated cross-method comparison tablesmethod_refactor_report.md— this writeupepimodelhiv_template_ref/— pinned downstream consumer scriptsnetstats_contract.md— field-level public contractREADME.md— workflow guideTogether that covers regression testing, cross-method numerics, and now the methodological narrative.