Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ All notable changes to TEPP are documented here. The format follows Keep a Chang

## [Unreleased]

- `psychometric_core` recovers the lagged covariance of §4.3 predetermined `T0VAR` independently on current main (register item 47). Driver, Oud, and Voelkle (2017, Eq. 3–4, pp. 4–5; §4.3, pp. 9–10; Table 2, p. 12; p. 16; §7.2, pp. 20–21; JSS PDF re-opened 2026-08-31T10:02Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) treat the first time point as predetermined when no assumptions are made about the process prior to `T0`: free first-occasion variance `p_0` is estimated. Equation 3 writes `η(t) = exp(A Δt) η(t0) + …`. Equation 4 writes `cov(η_t, η_{t-1}) = A_Δt cov(η_{t-1})`. Trait variance and `addedTIPREDVAR` are time-invariant between-subject and do not decay with `e^{a Δt}`. The lagged composition is `trait + e^{a Δt} p_0 + (B / a)² v`. Form the lagged free first-occasion covariance INLINE from on-main `recover_trait_plus_state_lagged_covariance` and `recover_asymptotic_time_independent_predictor_variance`; do not import unpublished `#363` later-occasion helpers or unpublished `#365` observed maps. Setting `p_0 = −q / (2 a)` recovers the stationary lagged map. Stationary lagged covariance uses `−q / (2 a)` in place of free `p_0` and is not this map when `p_0` is free. Later-occasion variance includes `Q_Δt` and is not this lagged map. Evolving `trait + p_0 + (B / a)² v` as if it were all state is not this map. Free `p_0` is not this map. A zero-diffusion carry with `a ≥ 0` is `e^{a Δt} p_0` and is kept. Nonzero TI extra still requires `a < 0`. Event-time-only clocks, non-positive `Δt`, and invalid numeric input fail closed. Meredith (1993) remains unread (Unpaywall 2026-08-31T10:02Z: `is_oa: false`; title *Measurement Invariance, Factor Analysis and Factorial Invariance*; Springer `content/pdf` historically an HTML stub). Mislevy (1991, *Psychometrika, 56*, 177–196, DOI `10.1007/bf02294457`) remains unread (Unpaywall 2026-08-31T10:02Z: `is_oa: false`; title *Randomization-Based Inference about Latent Variables from Complex Samples*). The 1988 ETS RR of the same title is OA-flagged by Unpaywall (`10.1002/j.2330-8516.1988.tb00310.x`) but Wiley `pdfdirect` returned Cloudflare 403; it is not the 1991 journal article. Still not a Kalman filter, not a matrix `expm`, not ESEM estimation, not DSEM, and not ctsem estimation.

- `event_core` adds bounded Allen interval-consistency classification, atomic path-consistency closure, contradiction/resource refusals, and an explicit dependency-error fallback without claiming unrestricted global satisfiability.

- `psychometric_core` recovers the Driver, Oud, and Voelkle (2017, Table 2, p. 12 `MANIFESTTRAITVAR`; §7.1, p. 19; p. 16 `MANIFESTTRAITVARstd`; footnote 4; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-27T14:20Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar standardised manifest-trait variance on current main after `0ce16e8` dropped the pre-consolidation code while research notes already named the map (register items 83–84). Table 2 names `MANIFESTTRAITVAR` `Ψ_τ` the additional time-invariant variance-covariance on the measurement level and sets it `NULL` when there is no manifest trait. Equation 5 writes `Γ ~ N(τ, Ψ)` and names that covariance the manifest traits. Section 7.1 names manifest traits stable individual differences in indicator levels, distinct from process-level `TRAITVAR` `φ_ξ`. Page 16 prints standardised matrices with the suffix `std` when appropriate. The printed example on p. 16 is `discreteDRIFTstd`, not `MANIFESTTRAITVARstd`. Footnote 4 standardises using only the relevant variance, not the total. The relevant variance for that named indicator-level correlation is `MANIFESTTRAITVAR`, not process-level `TRAITVAR` and not residual `MANIFESTVAR` `θ`. The 2017-era source forms `MANIFESTTRAITVARstd` only when `MANIFESTTRAITVAR != 0`, as `solve(sqrt(diag(MANIFESTTRAITVAR) + ridging)) %&% MANIFESTTRAITVAR` when `verbose = TRUE`. OpenMx `%&%` is `t(A) %*% B %*% A`. Unlike `TRAITVARstd`, that formation adds `diag(c(ridging), n.manifest)`. The default `ridging = FALSE` adds 0, not `0.0001`; that ridge is a numerical hack and is not this exact map. The scalar correlation is `ψ / ψ = 1` after strictly positive `MANIFESTTRAITVAR`. Form strictly positive `ψ` first, then `1 / √ψ`, then `(1 / √ψ) ψ (1 / √ψ)`. Unstandardised `MANIFESTTRAITVAR` is defined for a zero trait; standardised `MANIFESTTRAITVAR` is not. Zero `MANIFESTTRAITVAR` skips forming `MANIFESTTRAITVARstd` in the 2017-era source and fails closed here. Indicator-level trait variance is an event-time structural quantity, so a non-event clock fails closed. `MANIFESTTRAITVAR` does not require stable `a < 0`. Distinct positive `ψ` recover the same 1. `trait / trait = 1` is `TRAITVARstd` and recovers the same number and remains a distinct named quantity. `θ` is `MANIFESTVAR` and is measurement error, not this correlation. Meredith (1993) remains unread (web search 2026-08-27T14:20Z: 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.
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions crates/psychometric_core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,18 @@ pub enum PsychometricError {
/// later-occasion stationary observed variance. Lagged covariance
/// omits `Q_Δt` and `θ`.
StationaryLaggedObservedCovarianceIsNotStationaryLaterObservedVariance,
/// Driver §4.3 predetermined lagged covariance was treated as
/// stationary lagged covariance. Stationary lagged uses
/// `−q / (2 a)` in place of free `p_0`.
StationaryLaggedLatentCovarianceIsNotPredeterminedLaggedLatentCovariance,
/// Driver §4.3 predetermined later-occasion variance was treated
/// as predetermined lagged covariance. Later-occasion variance
/// includes `Q_Δt`; lagged covariance omits it.
PredeterminedLaterLatentVarianceIsNotPredeterminedLaggedLatentCovariance,
/// Driver §4.3 predetermined lagged covariance was treated as
/// `e^{a Δt}` of `trait + p_0 + (B / a)² v`. Trait variance and
/// `addedTIPREDVAR` do not decay.
DecayedPredeterminedTotalIsNotPredeterminedLaggedLatentCovariance,
/// Driver p. 16 `CINTstd` was requested without a strictly positive
/// `asymDIFFUSION`. Footnote 4 standardises using only the
/// relevant variance; zero `q` has no positive process SD.
Expand Down Expand Up @@ -1105,6 +1117,15 @@ impl fmt::Display for PsychometricError {
Self::StationaryLaggedObservedCovarianceIsNotStationaryLaterObservedVariance => {
"stationary lagged observed covariance is not the stationary later-occasion observed variance"
}
Self::StationaryLaggedLatentCovarianceIsNotPredeterminedLaggedLatentCovariance => {
"stationary lagged latent covariance is not the predetermined lagged latent covariance"
}
Self::PredeterminedLaterLatentVarianceIsNotPredeterminedLaggedLatentCovariance => {
"predetermined later-occasion latent variance is not the predetermined lagged latent covariance"
}
Self::DecayedPredeterminedTotalIsNotPredeterminedLaggedLatentCovariance => {
"decayed predetermined total is not the predetermined lagged latent covariance"
}
Self::StandardisedContinuousInterceptRequiresPositiveStationaryVariance => {
"standardised continuous intercept requires strictly positive stationary within-subject variance"
}
Expand Down Expand Up @@ -1850,6 +1871,21 @@ mod tests {
.to_string(),
"stationary lagged observed covariance is not the stationary later-occasion observed variance"
);
assert_eq!(
PsychometricError::StationaryLaggedLatentCovarianceIsNotPredeterminedLaggedLatentCovariance
.to_string(),
"stationary lagged latent covariance is not the predetermined lagged latent covariance"
);
assert_eq!(
PsychometricError::PredeterminedLaterLatentVarianceIsNotPredeterminedLaggedLatentCovariance
.to_string(),
"predetermined later-occasion latent variance is not the predetermined lagged latent covariance"
);
assert_eq!(
PsychometricError::DecayedPredeterminedTotalIsNotPredeterminedLaggedLatentCovariance
.to_string(),
"decayed predetermined total is not the predetermined lagged latent covariance"
);
}

#[test]
Expand Down
Loading
Loading