Skip to content

feat(psychometric): restore Driver 2017-era T0TRAITVAR t0_trait² · trait on main - #321

Draft
seonghobae wants to merge 2 commits into
mainfrom
agent/psychometric-t0-trait-var-on-main
Draft

seonghobae wants to merge 2 commits into
mainfrom
agent/psychometric-t0-trait-var-on-main

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Outcome

Restores the executable Driver, Oud, and Voelkle (2017) 2017-era T0TRAITVAR scalar t0_trait² · trait on current main after 0ce16e8 dropped the pre-consolidation code while research notes already named later Driver maps (register items 106–107).

Independent of open #320 Eq. 5 of T0TRAITEFFECT carry, #319 T0TRAITEFFECT carry, #318 T0TRAITEFFECT, #317 T0TDPREDCOV, #316 LAMBDAstd, #315/#272 TIPREDVARstd, #314 DRIFTstd, #313 DIFFUSIONstd, #312 Kish-weighted CWC, #311 discreteDIFFUSIONstd, #310 discreteDRIFTstd, #309 Eq. 5 of addedTIPREDVAR, #308 Eq. 5 of addedT0TIPREDVAR, #307 addedT0TIPREDVAR, #306 addedTIPREDVARstd, #305 discreteTIPREDEFFECTstd, #304 TDPREDEFFECTstd, #303 T0TDPREDEFFECTstd, #302 T0TIPREDEFFECTstd, #300 TIPREDEFFECTstd, and #299 asymTIPREDEFFECTstd. Do not stack on those PRs. This crate does not currently export recover_initial_trait_effect or recover_initial_time_independent_predictor_variance; form the quadratic directly and refuse addedT0TIPREDVAR by the named quantity.

JSS PDF re-opened 2026-08-30T18:50Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104. Table 2 (p. 12 TRAITVAR), §7.1 (pp. 18–19), and p. 16 were read from that PDF in this cycle. 2017-era ctsem 2.5.0 ctFit.R (lines 693–696, 1494–1508), summary.ctsemFit.R (lines 322–331), and ctGenerate.R (lines 113–116) were re-read locally.

  • Table 2 names TRAITVAR φ_ξ the latent trait variance/covariance and sets it NULL when there is no trait. Section 7.1 names traits the stable between-subject differences (unit-level unobserved heterogeneity).
  • T0TRAITEFFECT is not in Table 2 or Table 3. The 2017-era ctFit.R (ctsem 2.5.0, lines 693–696) places it as the OpenMx A path from the trait latent onto the process at T0. When 'T0TRAITEFFECT' is in stationary (lines 1494–1508) that path is the identity.
  • The 2017-era summary.ctsemFit.R (lines 322–331) comments T0TRAITVAR <- T0TRAITEFFECT %*% TRAITVAR %*% t(T0TRAITEFFECT) with #is this valid? — the same comment as addedT0TIPREDVAR.
  • The scalar analog of that quadratic form is t0_trait² · trait. Form t0_trait first, then square, then multiply by trait.
  • A zero coefficient or zero trait is exactly zero. trait < 0 fails closed. T0 is an event-time occasion, so a non-event clock fails closed. An overflowing product fails closed.
  • Free T0TRAITEFFECT does not require stable a < 0.
  • Stationary T0TRAITEFFECT = I makes T0TRAITVAR equal TRAITVAR numerically; those remain distinct named quantities.
  • t0_b² v is addedT0TIPREDVAR and is not this trait extra. (B / a)² v is addedTIPREDVAR and is not this first-occasion map. Free T0VAR p_0 is not this extra.
  • ctGenerate.R (lines 113–116) draws traits from N(0, I) and adds T0TRAITEFFECT %*% traits to T0MEANS, so the generate extra at T0 is t0_trait², not t0_trait² · trait.

Meredith (1993) remains unread (Unpaywall historically is_oa: false; Springer content/pdf is an HTML stub). Mislevy (1991, Psychometrika, 56, 177–196) remains unread on the same terms (DOI 10.1007/bf02294457).

Still not a Kalman filter, not a matrix expm, not ESEM estimation, not DSEM, and not ctsem estimation.

Local cargo test -p psychometric_core: 187 lib tests, 110 multilevel tests, 53 scientific-claim tests, plus crate/ESEM/plausible/Rubin contracts, all passed. cargo clippy -p psychometric_core --all-targets -- -D warnings passed.

Do not squash-merge without independent non-author APPROVE plus exact-head required-check success. Do not self-approve. Do not wait on Checks for this or sibling psychometric PRs.

…ait on main

Scalar analog of T0TRAITEFFECT %*% TRAITVAR %*% t(T0TRAITEFFECT) from
commented 2017-era summary.ctsemFit.R (ctsem 2.5.0 line 328, #is this
valid?). Independent of unpublished T0TRAITEFFECT / addedT0TIPREDVAR
PRs. Stationary identity equals TRAITVAR numerically and remains a
distinct named quantity. Refuses addedT0TIPREDVAR, addedTIPREDVAR,
T0VAR, and ctGenerate unit-normal extra t0_trait².
@coderabbitai

coderabbitai Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

Independent review requested on exact head f4d4b1e. Author will not self-approve. Squash-merge only after independent non-author APPROVE plus exact-head required-check success. CodeRabbit/Devin comments are not APPROVE.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

@seonghobae I will review pull request #321 at the requested head f4d4b1e. The review does not constitute an approval.

⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Resolve the CHANGELOG.md append conflict by keeping both entries.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@seonghobae

Copy link
Copy Markdown
Contributor Author

Restack on protected main (a243f18)

Non-force merge of origin/main (merge commit 92dd5f9b); the only conflict was the CHANGELOG.md append, both entries kept.

Local evidence on the pushed head (toolchain 1.98.0): cargo test -p psychometric_core 367 passed / 0 failed, clippy -D warnings clean, cargo fmt --all --check clean, documentation/workspace/docstring contracts PASS, git diff --check clean.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant