feat(psychometric): recover Driver later-occasion variance of predetermined T0VAR on main - #363
Draft
seonghobae wants to merge 1 commit into
Draft
Conversation
…rmined T0VAR on main Restore the §4.3 predetermined later-occasion T0VAR map on current main after 0ce16e8 dropped the pre-consolidation code. Free p_0 evolves as trait + e^{2 a Δt} p_0 + Q_Δt + (B / a)² v. Setting p_0 = −q/(2a) recovers the stationary later map as a number, not as the same named quantity. Nonzero diffusion with a ≥ 0 is a growing process and is kept. JSS PDF re-opened 2026-08-31T09:29Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Aug 31, 2026
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.
Summary
psychometric_corerecovers the Driver, Oud, and Voelkle (2017, §4.3, pp. 9–10; Eq. 3–5, pp. 4–5; Table 2, p. 12; p. 16; JSS PDF re-opened 2026-08-31T09:29Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar later-occasion variance of §4.3 predeterminedT0VARon current main.This is an independent companion of still-unmerged PR #310 (
discreteDRIFTstd), PR #357 (asymptotes=TRUEDIFFUSION rewrite), PR #355 / #352 (asymptotes=TRUETIPREDEFFECT rewrite), and PR #349 (asymptotes=TRUECINT rewrite). It branches fromorigin/main1bc02f58, does not wait for those drafts, and is not stacked on them. Closed PR #181 recovered this map on a predecessor of #49 and was dropped from current main (0ce16e8);github search recover_predeterminedon current main is zero hits. Stationary later-occasion variance is already on main asrecover_stationary_later_latent_variance. Predetermined first-occasionT0VARis freep_0and is not this later-occasion map.Section 4.3 treats the first time point as predetermined when no assumptions are made about the process prior to the initial time point. Free
T0VARp_0is then estimated (default in ctsem). The process gradually transitions from the variances of the initial parameters toward those of the parameters when the model is stationary. Between-subjectTRAITVAR/addedTIPREDVARare inherently stationary. Equation 3 writesη(t) = exp(A Δt) η(t0) + … +the stochastic integral. Equation 4 writes that the integral exhibits covarianceQ_Δt. The law of total variance on the within-subject state ise^{2 a Δt} p_0 + Q_Δt. Trait variance andaddedTIPREDVARare time-invariant between-subject and do not enter that process-noise integral. The later-occasion composition istrait + e^{2 a Δt} p_0 + Q_Δt + (B / a)² v. Form the evolved free first-occasion variance first, then include the trait, then include the TI extra variance, then add.p_0 = −q / (2 a)recovers the stationary later-occasion map.−q / (2 a)in place ofp_0and is not this map whenp_0is free.trait + p_0 + (B / a)² vas if it were all state is not this map.T0VARp_0is not this map.Δt → ∞with stablea < 0the composition approaches contemporaneous stationaryT0VAR.Δt → 0+the composition approachestrait + p_0 + (B / a)² v.a ≥ 0is a growing process and is kept (unlike the stationary later-occasion map, which fails closed ona ≥ 0).Fail-closed EventTime-only clocks, non-positive
Δt, and invalid numeric input. Three refuse helpers:refuse_predetermined_later_latent_variance_as_stationary_later_variance,refuse_predetermined_later_latent_variance_as_discrete_variance,refuse_predetermined_later_latent_variance_as_initial_variance.Meredith (1993) remains unread (Unpaywall historically
is_oa: false; Springercontent/pdfis an HTML stub). Mislevy (1991, Psychometrika, 56, 177–196, DOI 10.1007/bf02294457) remains unread on the same terms. Still not a Kalman filter, not a matrixexpm, not ESEM estimation, not DSEM, and not ctsem estimation.Plan
Fail-closed scalar
recover_predetermined_later_latent_variance(trait, p_0, q, B, v, a, Δt, clock)astrait + e^{2 a Δt} p_0 + Q_Δt + (B / a)² vonorigin/main, with three refuse helpers, three error variants, CHANGELOG, ADR 0005 timestamp, CLAUDE.md, research notes item 45 timestamp, and crate/contract tests. Independent of #310, #357, #355, #352, and #349.Verification
cargo clippy -p psychometric_core --all-targets -- -D warnings(clean)cargo test -p psychometric_core --lib(190 passed)cargo test -p psychometric_core --test multilevel_event_time_recovery_contract -- --exact recover_predetermined_later_latent_variance_matches_driver_total_variance refuse_predetermined_later_latent_variance_named_quantities_stay_distinct(2 passed)cargo test -p psychometric_core --test scientific_claim_boundary_contract -- --exact predetermined_later_latent_variance_is_not_stationary_later_or_discrete_or_initial(1 passed)Do not rustfmt
lib.rs(reorders types after functions).Opened by: Grok Build (xAI) on behalf of Seongho Bae.
Do not merge without independent non-author APPROVE + exact-head required-check success. Do not convert from draft. Do not self-approve. Do not request Copilot.