feat(psychometric): recover 2017-era active asymptotes=TRUE DIFFUSION rewrite on main - #357
Draft
seonghobae wants to merge 1 commit into
Draft
feat(psychometric): recover 2017-era active asymptotes=TRUE DIFFUSION rewrite on main#357seonghobae wants to merge 1 commit into
seonghobae wants to merge 1 commit into
Conversation
|
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
Draft
Draft
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 2017-era activeasymptotes=TRUEDIFFUSIONrewrite as the scalar−2 a · qon current main.This is an independent companion of still-unmerged PR #349 (
CINT <- -DRIFT %*% CINTas−a · κ) and PR #355 (TIPREDEFFECT <- -DRIFT %*% TIPREDEFFECTas−a · B). It branches fromorigin/main1bc02f58, does not wait for those drafts, and is not stacked on them. cran/ctsem 2.5.0summary.ctsemFit.Rhas three activeasymptotes=TRUErewrites: CINT (L213), DIFFUSION (L230), TIPREDEFFECT (L378–379). DIFFUSION was not on main and not in any open PR.cran/ctsem 2.5.0 forms
DRIFTHATCH <- (DRIFT %x% I) + (I %x% DRIFT)thenif(asymptotes==TRUE) DIFFUSION <- matrix(-DRIFTHATCH %*% OpenMx::rvectorize(DIFFUSION), nrow=n.latent, ncol=n.latent)immediately aftermxEval(DIFFUSION, mxobj, compute=TRUE)and puts that rewrite in the activeoutlist. Driver, Oud, and Voelkle (2017, Table 2, p. 12; Eq. 4, p. 5; p. 16; JSS PDF re-opened 2026-08-31T07:40Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) nameDIFFUSIONthe continuous process-noise covariance. For one latent the Kronecker sum is2 a, so the scalar map is−2 a · q. Form2 afirst, then negate, then multiply byq. Whenasymptotes=TRUEthe storedDIFFUSIONis the asymptotic parameterization Table 2 / p. 16 namesasymDIFFUSIONp = −q / (2 a); multiplying by-DRIFTHATCHconverts that stored value back to originalq.−2 a · (−q / (2 a)) = q. The companion active rewritesCINT <- -DRIFT %*% CINTandTIPREDEFFECT <- -DRIFT %*% TIPREDEFFECTuse-DRIFT, not-DRIFTHATCH, on different matrices and are not this process-noise map.A zero diffusion is exactly zero even if
a ≥ 0.a ≥ 0with a nonzero diffusion fails closed. A negative diffusion fails closed. Numeric:a = −0.25,q = 0.4recovers 0.2, distinct from unstandardisedDIFFUSION(0.4), fromasymDIFFUSION−q / (2 a)(0.8), from the finite-intervaldiscreteDIFFUSIONatΔt = 1(≈ 0.3148), and fromDIFFUSIONstdq / p = −2 a(0.5). Storedp = 0.8recovers originalq0.4. The rate is nota = −0.5, so−2 a · q ≠ q. Unstandardisedqis not this rewrite.asymDIFFUSIONis not this rewrite. Finite-intervalQ_Δtis not this rewrite.DIFFUSIONstdis not this rewrite. A non-event clock fails closed.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_asymptotes_true_continuous_diffusion(continuous_diffusion, log_rate, clock)as−2 a · qonorigin/main, with four refuse helpers (unstandardisedq,asymDIFFUSION,discreteDIFFUSION,DIFFUSIONstd), five error variants, register items 110–111, CHANGELOG, ADR 0005, and crate/contract tests. Independent of #349 and #355.Verification
cargo fmt --allcargo clippy -p psychometric_core --all-targets -- -D warningscargo test -p psychometric_core --lib(193)cargo test -p psychometric_core --test multilevel_event_time_recovery_contract(110)cargo test -p psychometric_core --test scientific_claim_boundary_contract(53)RUSTDOCFLAGS='-D warnings' cargo doc -p psychometric_core --no-depsRegister items 110–111.
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.