Skip to content

feat(psychometric): restore Driver p.16 DRIFTstd on main - #298

Closed
seonghobae wants to merge 1 commit into
mainfrom
agent/psychometric-drift-std-on-main
Closed

feat(psychometric): restore Driver p.16 DRIFTstd on main#298
seonghobae wants to merge 1 commit into
mainfrom
agent/psychometric-drift-std-on-main

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Outcome

Restores the executable Driver, Oud, and Voelkle (2017) p. 16 DRIFTstd scalar on current main after b03cc378 restored MANIFESTVARstd while research notes already named this map (register items 61–62).

Independent of #280 discreteDRIFTstd, #296 discreteDIFFUSIONstd, and #297 DIFFUSIONstd (open; do not convert or merge from this PR). This crate does not currently export discreteDRIFTstd; the refuse still names that quantity.

JSS PDF re-opened 2026-08-29T00:25Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104. Page 16, Equation 1 (p. 4), footnote 4, Table 2 (p. 12), and §7.1 (pp. 18–19) were read from that PDF in this cycle. 2017-era cran/ctsem 2.5.0 summary.ctsemFit.R was re-read locally.

  • Page 16 prints continuous-time parameters (e.g., DRIFT, DIFFUSION) and, when appropriate, standardised matrices with the suffix std. The printed example on p. 16 is discreteDRIFTstd, not DRIFTstd.
  • Footnote 4: standardisations use only the relevant variance, not the total. For DRIFT that relevant variance is within-subject asymDIFFUSION p = −q / (2 a), because DRIFT is intended to represent individual, or average individual, temporal dynamics.
  • The 2017-era summary.ctsemFit.R forms discreteDRIFTstd whenever verbose = TRUE, as discreteDRIFT * standardiser after standardiser <- rep(sqrt(diag(asymDIFFUSION)), each = n.latent) / rep(diag(sqrt(asymDIFFUSION)), times = n.latent). That source does not form a DRIFTstd matrix.
  • Scalar map: form strictly positive p first, then DRIFT * standardiser. In the scalar stationary case that SD ratio is 1 after strictly positive p, so the standardised auto-effect equals the unstandardised log-rate a numerically; those remain distinct named quantities.
  • Unstandardised a is defined for growing a ≥ 0 and for zero diffusion; standardised DRIFT is not. Zero q has no positive SD and fails closed. Lasting p requires stable a < 0. A non-event clock fails closed. Distinct positive q recover the same a.
  • e^{a Δt} is discreteDRIFTstd and depends on the event interval; it is not DRIFTstd.
  • Section 7.1 warns that omitting trait variance confounds between- and within-person information. a p / (trait + p + added) uses the total, not asymDIFFUSION, and is not DRIFTstd when TRAITVAR is nonzero. TRAITVAR is not the standardisation variance.

Meredith (1993) remains unread (web search 2026-08-29T00:25Z: Springer/Cambridge Core paywalled; 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.

Do not squash-merge without independent non-author APPROVE plus exact-head required-check success. Do not self-approve.


Devin Review

Summary by CodeRabbit

  • 새 기능

    • 연속시간 표준화 드리프트(DRIFTstd) 값을 복원하고 검증하는 기능이 추가되었습니다.
    • 비표준화 드리프트, 이산시간 드리프트, 특성 오염 드리프트를 DRIFTstd로 잘못 해석하지 않도록 자동으로 거부합니다.
    • 유효하지 않은 분산, 시간 단위 및 안정성 조건에 대한 명확한 오류가 제공됩니다.
  • 문서

    • DRIFTstd의 정의와 기존 표준화 방식과의 차이, 관련 근거가 문서에 추가·보완되었습니다.
  • 테스트

    • 복원 결과와 경계 조건, 잘못된 입력 거부 동작을 검증하는 테스트가 추가되었습니다.

Restores recover_standardised_drift after strictly positive
asymDIFFUSION. Scalar SD ratio is 1 so the standardised auto-effect
equals unstandardised a numerically; those remain distinct named
quantities. Refuses unstandardised a, discreteDRIFTstd, and
trait-contaminated a p/(trait+p+added). Independent of #280/#296/#297.

Driver, Oud, and Voelkle (2017, p. 16; Eq. 1; footnote 4).
JSS PDF re-opened 2026-08-29T00:25Z.
@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: abe6e3c0-bf8f-4dbd-9294-d32e56cc38b2

📥 Commits

Reviewing files that changed from the base of the PR and between b03cc37 and c46931a.

📒 Files selected for processing (8)
  • CHANGELOG.md
  • crates/psychometric_core/src/error.rs
  • crates/psychometric_core/src/event_time.rs
  • crates/psychometric_core/src/lib.rs
  • crates/psychometric_core/tests/multilevel_event_time_recovery_contract.rs
  • crates/psychometric_core/tests/scientific_claim_boundary_contract.rs
  • docs/adr/0005-posterior-esem-dsem.md
  • docs/research/multilevel-event-time-recovery.md

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

연속시간 DRIFTstd 복원 API와 관련 오류가 추가되었습니다. 구현은 양의 asymDIFFUSION과 이벤트 시계를 요구합니다. 비표준화, 이산, 특성 오염 드리프트와의 구분을 테스트와 문서에 반영했습니다.

Changes

DRIFTstd 표준화 복원

Layer / File(s) Summary
복원 계약과 공개 API
crates/psychometric_core/src/error.rs, crates/psychometric_core/src/event_time.rs, crates/psychometric_core/src/lib.rs
recover_standardised_drift와 세 가지 거부 함수가 추가되었습니다. 양의 asymDIFFUSION, 안정적인 log_rate, 이벤트 시계를 검증합니다. 관련 PsychometricError 변형과 재수출도 추가되었습니다.
복원 및 경계 검증
crates/psychometric_core/src/event_time.rs, crates/psychometric_core/tests/multilevel_event_time_recovery_contract.rs, crates/psychometric_core/tests/scientific_claim_boundary_contract.rs
복원 결과가 a와 일치하는지 검증합니다. 비유한 입력, 0 확산, 불안정 드리프트, 비이벤트 시계 및 잘못된 대체 맵의 오류를 검증합니다.
문서와 변경 이력
CHANGELOG.md, docs/adr/0005-posterior-esem-dsem.md, docs/research/multilevel-event-time-recovery.md
DRIFTstd의 연속시간 정의와 discreteDRIFTstd, 전체분산 기반 계산, 특성 오염 계산과의 구분을 기록했습니다.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to c4693

This PR adds a bounded scalar calculation with explicit validation for invalid inputs and does not change security, deployment, or runtime boundaries. No actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant ContractTests as contract tests
  participant Recover as recover_standardised_drift
  participant Variance as recover_stationary_latent_variance
  ContractTests->>Recover: diffusion, log_rate, EventTime 전달
  Recover->>Variance: 정상 within-subject variance 검증
  Variance-->>Recover: 양의 분산 또는 오류 반환
  Recover-->>ContractTests: DRIFTstd 값 또는 PsychometricError 반환
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 Driver p.16의 DRIFTstd 복원이라는 PR의 주요 변경 사항을 정확하고 구체적으로 설명합니다.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 4 files. (4 skipped: 3 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 4 files. (4 skipped: 3 unsupported, 1 too large.)

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/psychometric-drift-std-on-main

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.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Copy link
Copy Markdown
Contributor Author

Superseded by clean rebase #314 (head 272ee6c on current main 6444a810). This branch is on stale b03cc378. Do not merge this PR.

Copy link
Copy Markdown
Contributor Author

Closing as superseded by draft ContextualWisdomLab/TEPP#314. This head is mergeable_state: dirty against current main; #314 is the clean rebase of the same Driver p.16 DRIFTstd scalar. Not a merge.

@seonghobae seonghobae closed this Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant