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
2 changes: 1 addition & 1 deletion ARCHITECTURE.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,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 `T0MEANSstd`; Table 2, p. 12; footnote 4; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-24T22:30Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar standardised initial latent mean. 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 latent process means at the first time point `T0`. The first-occasion relevant variance is free `T0VAR` `p_0`, not process-dynamics `asymDIFFUSION` `-q / (2 a)`, matching Table 3 `T0TIPREDEFFECTstd`. The 2017-era `summary.ctsemFit.R` forms unstandardised `T0MEANS` as `OpenMx::mxEval(T0MEANS, mxobj, compute=TRUE)`. That source does not form a `T0MEANSstd` matrix; the scalar map here is the footnote 4 standardisation of that named first-occasion mean: `μ_0 / √p_0`. Form strictly positive `p_0` first, then divide `μ_0` by `√p_0`. A zero mean is exactly zero. Unstandardised `T0MEANS` is defined for a zero first-occasion variance; standardised `T0MEANS` is not. 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`. `T0VARstd` `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. Still not a Kalman filter, not a matrix `expm`, not ESEM estimation, not DSEM, and not ctsem estimation. Meredith (1993) remains unread (Unpaywall 2026-08-24T08:02Z: `is_oa: false`, 0 locations; title *Measurement Invariance, Factor Analysis and Factorial Invariance*). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread (Unpaywall 2026-08-24T08:02Z: `is_oa: false`, 0 locations; title *Randomization-Based Inference about Latent Variables from Complex Samples*).
- `psychometric_core` recovers the Driver, Oud, and Voelkle (2017, p. 16 `asymCINTstd`; Eq. 3, p. 4; footnote 4; Table 2, p. 12; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-24T09:05Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar standardised asymptotic continuous intercept. Page 16 prints standardised matrices with the suffix `std` when appropriate. Footnote 4 standardises using only the relevant variance, not the total. `CINT` is the process intercept of individual, or average individual, dynamics, so that relevant variance is within-subject `asymDIFFUSION` `p = −q / (2 a)`. The 2017-era `summary.ctsemFit.R` forms `asymCINT` whenever `verbose = TRUE`, as `-solve(DRIFT) %*% CINT`. That source does not form an `asymCINTstd` matrix; the scalar map here is the footnote 4 standardisation of that named asymptotic intercept: `(-κ / a) / √p`. Form strictly positive `p` first, then the asymptotic intercept, then divide by `√p`. A zero intercept is exactly zero. Unstandardised `asymCINT` is defined for a zero process; standardised `asymCINT` is not. Zero `q` has no positive process SD and fails closed. Lasting `asymDIFFUSION` requires stable `a < 0`. A non-event clock fails closed. `κ / √p` is the continuous intercept standardisation and is not this total-change map. `A^{-1}[e^{A Δt} − I] κ / √p` depends on the event interval and is not this `Δt → ∞` map. Still not a Kalman filter, not a matrix `expm`, not ESEM estimation, not DSEM, not `CINTstd`, not `discreteCINTstd`, and not ctsem estimation. Meredith (1993) remains unread (Unpaywall 2026-08-24T08:02Z: `is_oa: false`, 0 locations; title *Measurement Invariance, Factor Analysis and Factorial Invariance*). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread (Unpaywall 2026-08-24T08:02Z: `is_oa: false`, 0 locations; title *Randomization-Based Inference about Latent Variables from Complex Samples*).
- `psychometric_core` recovers the Driver, Oud, and Voelkle (2017, p. 16 `discreteCINTstd`; Eq. 3, p. 4; footnote 4; Table 2, p. 12; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-24T05:20Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar standardised discrete continuous intercept. Page 16 prints discrete-time transformations for a chosen event interval and, when appropriate, standardised matrices with the suffix `std`. Footnote 4 standardises using only the relevant variance, not the total. `CINT` is the process intercept of individual, or average individual, dynamics, so that relevant variance is within-subject `asymDIFFUSION` `p = −q / (2 a)`. The 2017-era `summary.ctsemFit.R` forms `discreteCINT` whenever `verbose = TRUE`, as `solve(DRIFT) %*% (discreteDRIFT − I) %*% CINT`. That source does not form a `discreteCINTstd` matrix; the scalar map here is the footnote 4 standardisation of that named discrete intercept: `A^{-1}[e^{A Δt} − I] κ / √p`. Form strictly positive `p` first, then the discrete intercept, then divide by `√p`. A zero intercept is exactly zero. Unstandardised `discreteCINT` is defined for growing `a ≥ 0` and for zero diffusion; standardised `discreteCINT` is not. Zero `q` has no positive process SD and fails closed. Lasting `asymDIFFUSION` requires stable `a < 0`. A non-event clock fails closed. A non-positive event interval fails closed. `κ / √p` does not depend on `Δt` and is not this finite-interval map. `(-κ / a) / √p` is the standardised asymptotic intercept and is not this map. Still not a Kalman filter, not a matrix `expm`, not ESEM estimation, not DSEM, not `CINTstd`, and not ctsem estimation. Meredith (1993) remains unread (Unpaywall 2026-08-24T08:02Z: `is_oa: false`, 0 locations; title *Measurement Invariance, Factor Analysis and Factorial Invariance*). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread (Unpaywall 2026-08-24T08:02Z: `is_oa: false`, 0 locations; title *Randomization-Based Inference about Latent Variables from Complex Samples*).
- `psychometric_core` recovers the Driver, Oud, and Voelkle (2017, p. 16 `asymDIFFUSIONstd`; footnote 4; Eq. 4; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-23T23:02Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar standardised asymptotic within-subject variance. Page 16 names `asymDIFFUSION` the total within-subject variance as `Δt → ∞` and prints standardised matrices with the suffix `std` when appropriate. Footnote 4 standardises using only the relevant variance, not the total. The 2017-era `summary.ctsemFit.R` forms `asymDIFFUSIONstd` whenever `verbose = TRUE`, as `solve(sqrt(diag(asymDIFFUSION) + ridging)) %&% asymDIFFUSION`. OpenMx `%&%` is the quadratic form `t(A) %*% B %*% A`. That formation adds `diag(c(ridging), n.latent)`. The default `ridging = FALSE` adds 0, not `0.0001`; that ridge is a numerical hack and is not this exact map. The 2017-era source assigns `dimnames(asymDIFFUSIONstd)` to `latentNames`; that assignment matches the `n.latent × n.latent` matrix and is this map. The scalar correlation is `p / p = 1` after strictly positive Lyapunov `p = −q / (2 a)`. Form strictly positive `p` first, then `1 / √p`, then `(1 / √p) p (1 / √p)`. Unstandardised `asymDIFFUSION` is defined for a zero process; standardised `asymDIFFUSION` is not. Zero `q` makes `solve(sqrt(0))` fail in the 2017-era source and fails closed here. That source does not skip forming `asymDIFFUSIONstd` when `p = 0`. Within-subject variance is an event-time structural quantity, so a non-event clock fails closed. Lasting `asymDIFFUSION` requires stable `a < 0`. Distinct positive `p` recover the same 1. `TIPREDVARstd` `v / v = 1` recovers the same number and remains a distinct named quantity. `DIFFUSIONstd` `q / p = −2 a` is the continuous-diffusion ratio, not this correlation. Still not a Kalman filter, not a matrix `expm`, not ESEM estimation, not DSEM, and not ctsem estimation. Meredith (1993) remains unread (Unpaywall 2026-08-24T08:02Z: `is_oa: false`, 0 locations; title *Measurement Invariance, Factor Analysis and Factorial Invariance*). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread (Unpaywall 2026-08-24T08:02Z: `is_oa: false`, 0 locations; title *Randomization-Based Inference about Latent Variables from Complex Samples*).
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions crates/psychometric_core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,26 @@ pub enum PsychometricError {
/// `asymCINTstd`. A finite event interval is not the
/// `Δt → ∞` intercept change.
StandardisedDiscreteContinuousInterceptIsNotStandardisedAsymptoticContinuousIntercept,
/// Driver p. 16 `T0MEANSstd` was requested with a
/// non-positive first-occasion variance. Footnote 4
/// standardisation of the 2017-era `T0MEANS` vector
/// requires strictly positive free `T0VAR`.
StandardisedInitialLatentMeanRequiresPositiveInitialLatentVariance,
/// Driver Table 2 unstandardised `T0MEANS` `μ_0` was treated
/// as `T0MEANSstd`. Unstandardised first-occasion mean is
/// defined for a zero first-occasion variance; standardised
/// `T0MEANS` is not.
UnstandardisedInitialLatentMeanIsNotStandardisedInitialLatentMean,
/// Driver p. 16 `T0VARstd` was treated as p. 16 `T0MEANSstd`.
/// 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.
StandardisedInitialLatentVarianceIsNotStandardisedInitialLatentMean,
/// Driver p. 16 `T0MEANS` `/ √asymDIFFUSION` was treated as
/// `T0MEANSstd`. Footnote 4 standardises the first-occasion
/// mean using free `T0VAR`, not process-dynamics
/// `asymDIFFUSION`.
WithinSubjectScaledInitialLatentMeanIsNotStandardisedInitialLatentMean,
}

impl fmt::Display for PsychometricError {
Expand Down Expand Up @@ -1862,6 +1882,18 @@ impl fmt::Display for PsychometricError {
Self::StandardisedDiscreteContinuousInterceptIsNotStandardisedAsymptoticContinuousIntercept => {
"standardised discrete continuous intercept is not standardised asymptotic continuous intercept"
}
Self::StandardisedInitialLatentMeanRequiresPositiveInitialLatentVariance => {
"standardised initial latent mean requires strictly positive initial latent variance"
}
Self::UnstandardisedInitialLatentMeanIsNotStandardisedInitialLatentMean => {
"unstandardised initial latent mean is not standardised initial latent mean"
}
Self::StandardisedInitialLatentVarianceIsNotStandardisedInitialLatentMean => {
"standardised initial latent variance is not standardised initial latent mean"
}
Self::WithinSubjectScaledInitialLatentMeanIsNotStandardisedInitialLatentMean => {
"within-subject scaled initial latent mean is not standardised initial latent mean"
}
};
formatter.write_str(message)
}
Expand Down Expand Up @@ -3217,4 +3249,28 @@ mod tests {
"standardised discrete continuous intercept is not standardised asymptotic continuous intercept"
);
}

#[test]
fn standardised_initial_latent_mean_boundary_messages_are_stable() {
assert_eq!(
PsychometricError::StandardisedInitialLatentMeanRequiresPositiveInitialLatentVariance
.to_string(),
"standardised initial latent mean requires strictly positive initial latent variance"
);
assert_eq!(
PsychometricError::UnstandardisedInitialLatentMeanIsNotStandardisedInitialLatentMean
.to_string(),
"unstandardised initial latent mean is not standardised initial latent mean"
);
assert_eq!(
PsychometricError::StandardisedInitialLatentVarianceIsNotStandardisedInitialLatentMean
.to_string(),
"standardised initial latent variance is not standardised initial latent mean"
);
assert_eq!(
PsychometricError::WithinSubjectScaledInitialLatentMeanIsNotStandardisedInitialLatentMean
.to_string(),
"within-subject scaled initial latent mean is not standardised initial latent mean"
);
}
}
Loading
Loading