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 `MANIFESTMEANSstd`; Table 2, p. 12; footnote 4; Eq. 5, p. 5; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-25T05:04Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar standardised manifest 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 `MANIFESTMEANS` `τ` the `n.manifest × 1` matrix of manifest means. Table 2 names `MANIFESTVAR` `Θ` the residual covariance of the indicators. The relevant variance for that named measurement intercept is residual `MANIFESTVAR` `θ`, not total observed `Var(y) = λ² Var(η) + θ`, matching `MANIFESTVARstd`. The 2017-era `summary.ctsemFit.R` forms unstandardised `MANIFESTMEANS` as `mxEval(MANIFESTMEANS, mxobj, compute=TRUE)`. That source does not form a `MANIFESTMEANSstd` matrix; the scalar map here is the footnote 4 standardisation of that named intercept: `τ / √θ`. Form strictly positive `θ` first, then divide `τ` by `√θ`. A zero mean is exactly zero. Unstandardised `MANIFESTMEANS` is defined for a zero residual; standardised `MANIFESTMEANS` is not. Zero `θ` has no positive SD and fails closed. Manifest means are an event-time measurement quantity, so a non-event clock fails closed. `MANIFESTMEANS` does not require stable `a < 0`. `MANIFESTVARstd` `θ / θ = 1` recovers the same number when `τ = √θ` and remains a distinct named quantity. `τ / √(λ² Var(η) + θ)` uses total observed variance and is not this residual map. The 2017-era source assigns `dimnames(MANIFESTMEANS)` to `list(manifestNames, manifestNames)` on an `n.manifest × 1` matrix; that assignment is a source bug and is not this map. `T0MEANSstd` `μ_0 / √p_0` recovers the same number when `τ = μ_0` and `θ = p_0` and remains a distinct named quantity. 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-25T05:04Z: `is_oa: false`, 0 locations; title *Measurement Invariance, Factor Analysis and Factorial Invariance*). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread (Unpaywall 2026-08-25T05:04Z: `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 `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*).
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions crates/psychometric_core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,27 @@ pub enum PsychometricError {
/// mean using free `T0VAR`, not process-dynamics
/// `asymDIFFUSION`.
WithinSubjectScaledInitialLatentMeanIsNotStandardisedInitialLatentMean,
/// Driver p. 16 `MANIFESTMEANSstd` was requested with a
/// non-positive residual. Footnote 4 standardisation of the
/// 2017-era `MANIFESTMEANS` vector requires strictly positive
/// `MANIFESTVAR`.
StandardisedManifestMeanRequiresPositiveManifestVariance,
/// Driver Table 2 unstandardised `MANIFESTMEANS` `τ` was treated
/// as `MANIFESTMEANSstd`. Unstandardised measurement intercept
/// is defined for a zero residual; standardised `MANIFESTMEANS`
/// is not.
UnstandardisedManifestMeanIsNotStandardisedManifestMean,
/// Driver p. 16 `MANIFESTVARstd` was treated as p. 16
/// `MANIFESTMEANSstd`. Equal numbers when `τ = √θ` are still
/// distinct named quantities. `MANIFESTVARstd` is the
/// correlation form of residual `MANIFESTVAR`;
/// `MANIFESTMEANSstd` is the measurement intercept.
StandardisedManifestVarianceIsNotStandardisedManifestMean,
/// Driver Eq. 5 `τ / √(λ² Var(η) + θ)` was treated as
/// `MANIFESTMEANSstd`. Footnote 4 standardises the named
/// intercept using residual `MANIFESTVAR`, not total observed
/// variance.
ObservedScaledManifestMeanIsNotStandardisedManifestMean,
}

impl fmt::Display for PsychometricError {
Expand Down Expand Up @@ -1894,6 +1915,18 @@ impl fmt::Display for PsychometricError {
Self::WithinSubjectScaledInitialLatentMeanIsNotStandardisedInitialLatentMean => {
"within-subject scaled initial latent mean is not standardised initial latent mean"
}
Self::StandardisedManifestMeanRequiresPositiveManifestVariance => {
"standardised manifest mean requires strictly positive measurement error"
}
Self::UnstandardisedManifestMeanIsNotStandardisedManifestMean => {
"unstandardised manifest mean is not standardised manifest mean"
}
Self::StandardisedManifestVarianceIsNotStandardisedManifestMean => {
"standardised manifest variance is not standardised manifest mean"
}
Self::ObservedScaledManifestMeanIsNotStandardisedManifestMean => {
"observed scaled manifest mean is not standardised manifest mean"
}
};
formatter.write_str(message)
}
Expand Down Expand Up @@ -3273,4 +3306,25 @@ mod tests {
"within-subject scaled initial latent mean is not standardised initial latent mean"
);
}

#[test]
fn standardised_manifest_mean_boundary_messages_are_stable() {
assert_eq!(
PsychometricError::StandardisedManifestMeanRequiresPositiveManifestVariance.to_string(),
"standardised manifest mean requires strictly positive measurement error"
);
assert_eq!(
PsychometricError::UnstandardisedManifestMeanIsNotStandardisedManifestMean.to_string(),
"unstandardised manifest mean is not standardised manifest mean"
);
assert_eq!(
PsychometricError::StandardisedManifestVarianceIsNotStandardisedManifestMean
.to_string(),
"standardised manifest variance is not standardised manifest mean"
);
assert_eq!(
PsychometricError::ObservedScaledManifestMeanIsNotStandardisedManifestMean.to_string(),
"observed scaled manifest mean is not standardised manifest mean"
);
}
}
Loading
Loading