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; §7.2, pp. 20–21; Table 2, p. 12; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-23T21:22Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar standardised extra time-independent predictor variance `addedTIPREDVARstd`. Page 16 prints standardised matrices with the suffix `std` when appropriate. After `addedTIPREDVAR` as `asymTIPREDEFFECT %*% TIPREDVAR %*% t(asymTIPREDEFFECT)`, the 2017-era `summary.ctsemFit.R` forms `addedTIPREDVARstd = solve(sqrt(diag(addedTIPREDVAR))) %&% addedTIPREDVAR`. OpenMx `%&%` is the quadratic form `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 `extra / extra = 1` after strictly positive extra. Form `addedTIPREDVAR` first, then the ratio. A zero extra has no positive extra SD and fails closed. Unstandardised `(B / a)² v` is defined for a zero coefficient and for zero predictor variance; standardised `addedTIPREDVAR` is not. `λ² (B / a)² v` is Eq. 5 of the extra, not this correlation. `t0_b² v` is `addedT0TIPREDVAR`, not this asymptotic extra correlation. `TRAITVAR` is not the standardisation variance. The printed 2-latent `addedTIPREDVAR` 2.838 is not this scalar 1. 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-23T21:22Z: `is_oa: false`; title *Measurement Invariance, Factor Analysis and Factorial Invariance*). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread (Unpaywall 2026-08-23T21:22Z: `is_oa: false`; title *Randomization-Based Inference about Latent Variables from Complex Samples*).
- `psychometric_core` recovers the Driver, Oud, and Voelkle (2017, Eq. 5, p. 5; Table 2, p. 12; §7.2, pp. 20–21; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-23T19:23Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar extra observed-indicator time-independent predictor variance of §7.2 `addedTIPREDVAR`. Equation 5 writes `y_i(t) = Γ + Λ η_i(t) + ζ_i(t)` with `ζ ~ N(0, Θ)` and `Γ ~ N(τ, Ψ)`. The 2017-era `summary.ctsemFit.R` forms the latent extra `addedTIPREDVAR` as `asymTIPREDEFFECT %*% TIPREDVAR %*% t(asymTIPREDEFFECT)`. The scalar latent extra is `(B / a)² v`. Equation 5 of that extra, with `θ = 0` and `ψ = 0`, is `λ² (B / a)² v`. Form `addedTIPREDVAR` first, then `(λ extra) λ`. Do not form `λ²` first. A zero loading or zero extra is exactly zero. `v < 0` fails closed. A non-event clock fails closed. `a ≥ 0` cannot hold a finite process-mean change when the extra is nonzero and fails closed. `(B / a)² v` is the latent extra, not this observed extra. `λ² t0_b² v` is Eq. 5 of `addedT0TIPREDVAR`, not this asymptotic observed extra. `λ² p + θ` is stationary observed variance, not this extra. `MANIFESTVAR` `θ` is measurement error, not this extra. `Ψ` is intercept variance and is not extra TI. The printed 2-latent `addedTIPREDVAR` 2.838 is not this scalar 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-23T19:10Z: `is_oa: false`; title *Measurement Invariance, Factor Analysis and Factorial Invariance*). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread (Unpaywall 2026-08-23T19:10Z: `is_oa: false`; title *Randomization-Based Inference about Latent Variables from Complex Samples*).
- `psychometric_core` recovers the Driver, Oud, and Voelkle (2017, Eq. 5, p. 5; Table 3, p. 13 `T0TIPREDEFFECT`; Table 2, p. 12; p. 16; §7.2, pp. 20–21; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-23T19:10Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar extra observed-indicator time-independent predictor variance of 2017-era `addedT0TIPREDVAR`. Equation 5 writes `y_i(t) = Γ + Λ η_i(t) + ζ_i(t)` with `ζ ~ N(0, Θ)` and `Γ ~ N(τ, Ψ)`. The 2017-era `summary.ctsemFit.R` forms the latent extra `addedT0TIPREDVAR` as `T0TIPREDEFFECT %*% TIPREDVAR %*% t(T0TIPREDEFFECT)` immediately after `T0TIPREDEFFECTstd`. The scalar latent extra is `t0_b² v`. Equation 5 of that extra, with `θ = 0` and `ψ = 0`, is `λ² t0_b² v`. Form `addedT0TIPREDVAR` first, then `(λ extra) λ`. Do not form `λ²` first. A zero loading or zero extra is exactly zero. `v < 0` fails closed. `T0` is an event-time occasion, so a non-event clock fails closed. Free `T0TIPREDEFFECT` does not require stable `a < 0`. `t0_b² v` is the latent extra, not this observed extra. `λ² p_0 + θ` is first-occasion observed variance, not this extra. `λ² (B / a)² v` is Eq. 5 of `addedTIPREDVAR`, not this first-occasion observed extra. `MANIFESTVAR` `θ` is measurement error, not this extra. `Ψ` is intercept variance and is not extra TI. 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-23T19:10Z: `is_oa: false`; title *Measurement Invariance, Factor Analysis and Factorial Invariance*). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread (Unpaywall 2026-08-23T19:10Z: `is_oa: false`; title *Randomization-Based Inference about Latent Variables from Complex Samples*).
- `psychometric_core` recovers the Driver, Oud, and Voelkle (2017, Table 3, p. 13 `T0TIPREDEFFECT`; p. 16; §7.2, pp. 20–21; Eq. 3, p. 5; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-23T18:20Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar first-occasion extra time-independent predictor variance `addedT0TIPREDVAR`. Table 3 names `T0TIPREDEFFECT` the effect of time-independent predictors on latents at `T0`. Page 16 prints extra summary matrices when `verbose = TRUE`. The 2017-era `summary.ctsemFit.R` forms `addedT0TIPREDVAR` as `T0TIPREDEFFECT %*% TIPREDVAR %*% t(T0TIPREDEFFECT)` immediately after `T0TIPREDEFFECTstd`. Section 7.2 names `addedTIPREDVAR` the stable between-subject variance accounted for by time-independent predictors at the process asymptote, `(B / a)² v`. The first-occasion analogue uses free `T0TIPREDEFFECT`, not `-B / a`. The scalar map is `t0_b² v`. Form `t0_b` first, then square, then multiply by `v`. A zero coefficient or zero predictor variance is exactly zero. `v < 0` fails closed. `T0` is an event-time occasion, so a non-event clock fails closed. Free `T0TIPREDEFFECT` does not require stable `a < 0`. `(B / a)² v` is `addedTIPREDVAR` and is not this first-occasion map. `t0_b · √v / √p_0` is `T0TIPREDEFFECTstd` and is not this variance. Free `T0VAR` `p_0` is the first-occasion state, not the extra TI variance. `TRAITVAR` is a zero-drift latent process, not `t0_b² v`. 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-23T18:20Z: `is_oa: false`; title *Measurement Invariance, Factor Analysis and Factorial Invariance*). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread (Unpaywall 2026-08-23T18:20Z: `is_oa: false`; 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.

52 changes: 52 additions & 0 deletions crates/psychometric_core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,22 @@ pub enum PsychometricError {
/// treated as `MANIFESTVAR` `θ`. Measurement error is not extra
/// observed TI variance.
AsymptoticTimeIndependentObservedVarianceIsNotMeasurementError,
/// Driver 2017-era `addedTIPREDVARstd` was requested with a
/// non-positive extra TI variance. The scalar correlation form
/// `extra / extra` requires strictly positive `addedTIPREDVAR`.
StandardisedAsymptoticTimeIndependentVarianceRequiresPositiveExtraVariance,
/// Driver 2017-era unstandardised `addedTIPREDVAR` `(B / a)² v`
/// was treated as `addedTIPREDVARstd`. Those remain distinct
/// named quantities even when a 1-latent correlation is 1.
UnstandardisedAsymptoticTimeIndependentVarianceIsNotStandardisedAsymptoticTimeIndependentVariance,
/// Driver Eq. 5 of §7.2 `addedTIPREDVAR` `λ² (B / a)² v` was
/// treated as 2017-era `addedTIPREDVARstd`. Observed extra is
/// not the latent extra correlation.
AsymptoticTimeIndependentObservedVarianceIsNotStandardisedAsymptoticTimeIndependentVariance,
/// Driver 2017-era `addedT0TIPREDVAR` `t0_b² v` was treated as
/// `addedTIPREDVARstd`. First-occasion extra is not the
/// asymptotic extra correlation.
InitialTimeIndependentVarianceIsNotStandardisedAsymptoticTimeIndependentVariance,
}

impl fmt::Display for PsychometricError {
Expand Down Expand Up @@ -1516,6 +1532,18 @@ impl fmt::Display for PsychometricError {
Self::AsymptoticTimeIndependentObservedVarianceIsNotMeasurementError => {
"asymptotic time-independent observed variance is not measurement-error variance"
}
Self::StandardisedAsymptoticTimeIndependentVarianceRequiresPositiveExtraVariance => {
"standardised asymptotic time-independent predictor variance requires positive extra variance"
}
Self::UnstandardisedAsymptoticTimeIndependentVarianceIsNotStandardisedAsymptoticTimeIndependentVariance => {
"unstandardised asymptotic time-independent predictor variance is not standardised asymptotic time-independent predictor variance"
}
Self::AsymptoticTimeIndependentObservedVarianceIsNotStandardisedAsymptoticTimeIndependentVariance => {
"asymptotic time-independent observed variance is not standardised asymptotic time-independent predictor variance"
}
Self::InitialTimeIndependentVarianceIsNotStandardisedAsymptoticTimeIndependentVariance => {
"initial time-independent predictor variance is not standardised asymptotic time-independent predictor variance"
}
};
formatter.write_str(message)
}
Expand Down Expand Up @@ -2614,4 +2642,28 @@ mod tests {
"asymptotic time-independent observed variance is not measurement-error variance"
);
}

#[test]
fn standardised_asymptotic_time_independent_variance_boundary_messages_are_stable() {
assert_eq!(
PsychometricError::StandardisedAsymptoticTimeIndependentVarianceRequiresPositiveExtraVariance
.to_string(),
"standardised asymptotic time-independent predictor variance requires positive extra variance"
);
assert_eq!(
PsychometricError::UnstandardisedAsymptoticTimeIndependentVarianceIsNotStandardisedAsymptoticTimeIndependentVariance
.to_string(),
"unstandardised asymptotic time-independent predictor variance is not standardised asymptotic time-independent predictor variance"
);
assert_eq!(
PsychometricError::AsymptoticTimeIndependentObservedVarianceIsNotStandardisedAsymptoticTimeIndependentVariance
.to_string(),
"asymptotic time-independent observed variance is not standardised asymptotic time-independent predictor variance"
);
assert_eq!(
PsychometricError::InitialTimeIndependentVarianceIsNotStandardisedAsymptoticTimeIndependentVariance
.to_string(),
"initial time-independent predictor variance is not standardised asymptotic time-independent predictor variance"
);
}
}
Loading
Loading