Skip to content
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ All notable changes to TEPP are documented here. The format follows Keep a Chang

## [Unreleased]

- `psychometric_core` recovers the Driver, Oud, and Voelkle (2017, p. 16 `T0VARstd`; Table 2, p. 12; footnote 4; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-26T07:17Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar standardised initial latent variance on current main after `0ce16e8` dropped the pre-consolidation code while research notes already named the map (register items 79–80). Page 16 prints standardised matrices with the suffix `std` when appropriate. The printed example on p. 16 is `discreteDRIFTstd`, not `T0VARstd`. Footnote 4 standardises using only the relevant variance, not the total. Table 2 names `T0VAR` the latent process initial variance/covariance. The first-occasion relevant variance is free `T0VAR` `p_0`, not process-dynamics `asymDIFFUSION` `-q / (2 a)`. The 2017-era source forms `T0VARstd` as `solve(sqrt(diag(T0VAR))) %&% T0VAR` when `verbose = TRUE`. OpenMx `%&%` is `t(A) %*% B %*% A`. 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 `p_0 / p_0 = 1` after strictly positive `p_0`. Form strictly positive `p_0` first, then `1 / √p_0`, then `(1 / √p_0) p_0 (1 / √p_0)`. A zero first-occasion variance has no positive SD and fails closed. `T0` is an event-time occasion, so a non-event clock fails closed. Free `T0VAR` does not require stable `a < 0`. Distinct positive `p_0` recover the same 1. `μ_0 / √p_0` is `T0MEANSstd` and recovers the same number when `μ_0 = √p_0` and remains a distinct named quantity. `p / p = 1` is `asymDIFFUSIONstd` and recovers the same number and remains a distinct named quantity. Meredith (1993) remains unread (Unpaywall 2026-08-26T07:17Z: `is_oa: false`; OpenAlex closed; Springer `content/pdf` is a 3038-byte HTML stub). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread on the same terms (DOI `10.1007/bf02294457`; Unpaywall `is_oa: false`). Still not a Kalman filter, not a matrix `expm`, not ESEM estimation, not DSEM, and not ctsem estimation.
- `psychometric_core` recovers the Driver, Oud, and Voelkle (2017, p. 16 `asymCINTstd`; Eq. 3, p. 4; Table 2, p. 12; footnote 4; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-26T00:20Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar standardised asymptotic continuous intercept on current main after consolidation dropped the pre-consolidation `(-κ / a) / √p` slice. Page 16 prints standardised matrices with the suffix `std` when appropriate, and asymptotic values as `Δt → ∞`. Footnote 4 standardises using only the relevant variance, not the total. Table 2 names `κ` `CINT`. The relevant variance for that process intercept is within-subject `asymDIFFUSION` `p = −q / (2 a)`. The 2017-era source forms unstandardised `asymCINT` whenever `verbose = TRUE` as `-solve(DRIFT) %*% CINT` and does not form an `asymCINTstd` matrix. Form strictly positive `p` first, then the asymptotic intercept, then divide by `√p`. A zero intercept is exactly zero after that positive SD. Zero `q` has no positive process SD and fails closed. Lasting `p` requires stable `a < 0`. A non-event clock fails closed. `κ / √p` is `CINTstd` and is not this total-change map. `A^{-1}[e^{A Δt} − I] κ / √p` is `discreteCINTstd` and depends on the event interval. Meredith (1993) remains unread (Unpaywall 2026-08-25T18:22Z: `is_oa: false`; Springer `content/pdf` is a 3038-byte HTML stub). Mislevy (1991) remains unread on the same terms. Still not a Kalman filter, not a matrix `expm`, not ESEM estimation, not DSEM, and not ctsem estimation.
- `psychometric_core` recovers the Driver, Oud, and Voelkle (2017, p. 16 `T0MEANSstd`; Table 2, p. 12; footnote 4; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-26T04:09Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar standardised initial latent mean on current main after `0ce16e8` dropped the pre-consolidation code while research notes already named the map. Page 16 prints standardised matrices with the suffix `std` when appropriate. Footnote 4 standardises using only the relevant variance, not the total. Table 2 names `T0MEANS` the `n.latent × 1` matrix of latent process means at the first time point `T0` and names `T0VAR` the latent process initial variance/covariance. The first-occasion relevant variance is free `T0VAR` `p_0`, not process-dynamics `asymDIFFUSION` `-q / (2 a)`. The 2017-era source forms unstandardised `T0MEANS` and does not form a `T0MEANSstd` matrix; the scalar map is `μ_0 / √p_0` after strictly positive `p_0`. A zero mean is exactly zero. Zero `p_0` has no positive SD and fails closed. `T0` is an event-time occasion, so a non-event clock fails closed. Free `T0MEANS` does not require stable `a < 0`. `p_0 / p_0 = 1` recovers the same number when `μ_0 = √p_0` and remains a distinct named quantity. `μ_0 / √asymDIFFUSION` uses process-dynamics variance and is not this first-occasion map. Meredith (1993) remains unread (Unpaywall 2026-08-26T00:22Z: `is_oa: false`; OpenAlex closed; Springer `content/pdf` is a 3038-byte HTML stub). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread on the same terms. Still not a Kalman filter, not a matrix `expm`, not ESEM estimation, not DSEM, and not ctsem estimation.
- `psychometric_core` recovers the Driver, Oud, and Voelkle (2017, p. 16 `MANIFESTMEANSstd`; Table 2, p. 12; footnote 4; Eq. 5, p. 5; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-25T11:32Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar standardised manifest mean on current main after `0ce16e8` restored the pre-consolidation unstandardised slice. Page 16 prints standardised matrices with the suffix `std` when appropriate. Footnote 4 standardises using only the relevant variance, not the total. Table 2 names `MANIFESTMEANS` `τ` the `n.manifest × 1` matrix of manifest means and `MANIFESTVAR` `Θ` the residual covariance of the indicators. The relevant variance for that named measurement intercept is residual `θ`, not total observed `Var(y) = λ² Var(η) + θ`. The 2017-era source forms unstandardised `MANIFESTMEANS` and does not form a `MANIFESTMEANSstd` matrix; the scalar map is `τ / √θ` after strictly positive `θ`. A zero mean is exactly zero. Zero `θ` has no positive SD and fails closed. A non-event clock fails closed. `MANIFESTMEANS` does not require stable `a < 0`. `θ / θ = 1` recovers the same number when `τ = √θ` and remains a distinct named quantity. `τ / √(λ² Var(η) + θ)` uses total observed variance and is not this residual map. Meredith (1993) remains unread (Unpaywall 2026-08-25T11:32Z: `is_oa: false`, 0 locations; OpenAlex closed; Springer `content/pdf` is a 3038-byte HTML stub). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread (Unpaywall 2026-08-25T11:32Z: `is_oa: false`, 0 locations). Still not a Kalman filter, not a matrix `expm`, not ESEM estimation, not DSEM, and not ctsem estimation.
Expand Down
57 changes: 57 additions & 0 deletions crates/psychometric_core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,27 @@ pub enum PsychometricError {
/// mean using free `T0VAR`, not process-dynamics
/// `asymDIFFUSION`.
WithinSubjectScaledInitialLatentMeanIsNotStandardisedInitialLatentMean,
/// Driver p. 16 `T0VARstd` was requested with a non-positive
/// first-occasion variance. Footnote 4 standardisation of the
/// 2017-era `T0VAR` matrix requires strictly positive free
/// `T0VAR`.
StandardisedInitialLatentVarianceRequiresPositiveInitialLatentVariance,
/// Driver Table 2 unstandardised `T0VAR` `p_0` was treated as
/// p. 16 `T0VARstd`. Unstandardised `p_0` is defined for a zero
/// first-occasion variance; standardised `T0VAR` is not.
UnstandardisedInitialLatentVarianceIsNotStandardisedInitialLatentVariance,
/// Driver p. 16 `T0MEANSstd` was treated as p. 16 `T0VARstd`.
/// Equal numbers when `μ_0 = √p_0` are still distinct named
/// quantities. `T0VARstd` is the correlation form of free
/// `T0VAR`; `T0MEANSstd` is the first-occasion mean.
StandardisedInitialLatentMeanIsNotStandardisedInitialLatentVariance,
/// Driver p. 16 `asymDIFFUSIONstd` was treated as p. 16
/// `T0VARstd`. Equal numbers of 1 after a strictly positive
/// relevant variance are still distinct named quantities.
/// `T0VARstd` is the correlation form of free `T0VAR`;
/// `asymDIFFUSIONstd` is the correlation form of process-
/// dynamics `asymDIFFUSION`.
StandardisedAsymptoticDiffusionIsNotStandardisedInitialLatentVariance,
/// Driver p. 16 `discreteCINTstd` 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 @@ -1030,6 +1051,18 @@ impl fmt::Display for PsychometricError {
Self::WithinSubjectScaledInitialLatentMeanIsNotStandardisedInitialLatentMean => {
"within-subject scaled initial latent mean is not standardised initial latent mean"
}
Self::StandardisedInitialLatentVarianceRequiresPositiveInitialLatentVariance => {
"standardised initial latent variance requires strictly positive initial latent variance"
}
Self::UnstandardisedInitialLatentVarianceIsNotStandardisedInitialLatentVariance => {
"unstandardised initial latent variance is not standardised initial latent variance"
}
Self::StandardisedInitialLatentMeanIsNotStandardisedInitialLatentVariance => {
"standardised initial latent mean is not standardised initial latent variance"
}
Self::StandardisedAsymptoticDiffusionIsNotStandardisedInitialLatentVariance => {
"standardised asymptotic diffusion is not standardised initial latent variance"
}
Self::StandardisedDiscreteContinuousInterceptRequiresPositiveStationaryVariance => {
"standardised discrete continuous intercept requires strictly positive stationary within-subject variance"
}
Expand Down Expand Up @@ -1745,6 +1778,30 @@ mod tests {
);
}

#[test]
fn standardised_initial_latent_variance_boundary_messages_are_stable() {
assert_eq!(
PsychometricError::StandardisedInitialLatentVarianceRequiresPositiveInitialLatentVariance
.to_string(),
"standardised initial latent variance requires strictly positive initial latent variance"
);
assert_eq!(
PsychometricError::UnstandardisedInitialLatentVarianceIsNotStandardisedInitialLatentVariance
.to_string(),
"unstandardised initial latent variance is not standardised initial latent variance"
);
assert_eq!(
PsychometricError::StandardisedInitialLatentMeanIsNotStandardisedInitialLatentVariance
.to_string(),
"standardised initial latent mean is not standardised initial latent variance"
);
assert_eq!(
PsychometricError::StandardisedAsymptoticDiffusionIsNotStandardisedInitialLatentVariance
.to_string(),
"standardised asymptotic diffusion is not standardised initial latent variance"
);
}

#[test]
fn standardised_discrete_continuous_intercept_boundary_messages_are_stable() {
assert_eq!(
Expand Down
Loading
Loading