Skip to content
Closed
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
6 changes: 3 additions & 3 deletions ARCHITECTURE.md

Large diffs are not rendered by default.

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 Hamaker, Kuiper, and Grasman (2015, Eq. 1a–1d; UvA-DARE PDF opened 2026-09-03T06:07Z KST from https://dare.uva.nl) occasion-mean-centered event-time lags. The CLPM measurement equation is `x_it = μ_t + p_it` where `μ_t` is the grand mean at occasion `t`, not the sample-wide grand mean and not the person mean. The temporal deviations `p_it` still contain trait-like between-person differences; lagged relations on those residuals are not within-person. This slice forms `p_it` on aligned event-time waves, maps consecutive residuals through the exact scalar log-rate `a = ln(p_{i,t}/p_{i,t-1}) / Δt` (Voelkle et al., 2012, Eq. 7), and refuses treating that rate as a within-person lag. Consecutive aligned waves may have unequal spacing. Unaligned event times have no shared occasion and fail closed. This is not RI-CLPM (Hamaker et al., 2015, Eq. 3a), not DSEM, not CWC, and not the open `#332` sample-grand-mean lag. Meredith (1993) remains unread (Unpaywall 2026-09-03T06:07Z KST: `is_oa: false`). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread on the same terms (DOI `10.1007/bf02294457`; Unpaywall `is_oa: false`).

- `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.

2 changes: 1 addition & 1 deletion crates/psychometric_core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "psychometric_core"
description = "Posterior-aware ESEM/DSEM input gates, multilevel/event-time recovery, CWC contextual effect, Voelkle Eqs. 12 and 14, Driver Eq. 3 TDPRED/TIPRED maps including within-interval impulse carry, Rubin T, and strong-invariance latent means."
description = "Posterior-aware ESEM/DSEM input gates, multilevel/event-time recovery, CWC contextual effect, Hamaker Eq. 1a occasion-mean residual lag (not within-person), Voelkle Eqs. 12 and 14, Driver Eq. 3 TDPRED/TIPRED maps including within-interval impulse carry, Rubin T, and strong-invariance latent means."
version.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand Down
17 changes: 17 additions & 0 deletions crates/psychometric_core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,12 @@ pub enum PsychometricError {
/// `MANIFESTVARstd`. `λ² Var(η) + θ` is `Var(y)`, not the
/// correlation form of `Θ`.
ObservedVarianceIsNotStandardisedManifestVariance,
/// Hamaker, Kuiper, and Grasman (2015, Eq. 1a–1d) occasion-mean
/// residuals `p_it = x_it − μ_t` were treated as within-person
/// residuals. Those temporal deviations still contain trait-like
/// between-person differences from the time-varying group mean.
/// This is not RI-CLPM (their Eq. 3a).
OccasionMeanCenteredLagIsNotWithinPerson,
}

impl fmt::Display for PsychometricError {
Expand Down Expand Up @@ -1235,6 +1241,9 @@ impl fmt::Display for PsychometricError {
Self::ObservedVarianceIsNotStandardisedManifestVariance => {
"observed-indicator variance is not standardised measurement-error variance"
}
Self::OccasionMeanCenteredLagIsNotWithinPerson => {
"occasion-mean-centered lag is not a within-person lag"
}
};
formatter.write_str(message)
}
Expand Down Expand Up @@ -2073,4 +2082,12 @@ mod tests {
"measurement error is not standardised manifest-trait variance"
);
}

#[test]
fn occasion_mean_centered_lag_boundary_message_is_stable() {
assert_eq!(
PsychometricError::OccasionMeanCenteredLagIsNotWithinPerson.to_string(),
"occasion-mean-centered lag is not a within-person lag"
);
}
}
Loading