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, Table 3, p. 13 `T0TDPREDEFFECTstd`; Table 2, p. 12 `TDPREDVAR`; p. 16; footnote 4; Eq. 3, p. 5; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-23T18:17Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar standardised first-occasion time-dependent predictor effect. Table 3 names `T0TDPREDEFFECT` the effect of time-dependent predictors on latents at `T0`. Page 16 prints standardised matrices with the suffix `std` when appropriate. Footnote 4: standardisations use only the relevant variance, not the total. The affecting variance is time-dependent predictor variance `TDPREDVAR` `v_x`, not `TIPREDVAR`. The affected variance is free first-occasion `T0VAR` `p_0`, not within-subject `asymDIFFUSION` `-q / (2 a)`, because Table 3 is the first occasion, not the process dynamics. Form strictly positive `p_0` first, then strictly positive `v_x`, then `t0_m · √v_x / √p_0`. Unstandardised `t0_m` is defined for a zero coefficient and for zero predictor variance; standardised `T0TDPREDEFFECT` is not. Zero `p_0` or zero `v_x` 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`. Same numbers as `T0TIPREDEFFECTstd` yield the same product; Table 3 names a different matrix. The continuous standardisation `B · √v / √(-q / (2 a))` uses `asymDIFFUSION` and is not this first-occasion map. Section 7.1 warns that omitting trait variance confounds between- and within-person information. `t0_m · √v_x / √(trait + p_0 + added)` uses the total, not free `T0VAR`, and is not `T0TDPREDEFFECTstd` when `TRAITVAR` is nonzero. `TRAITVAR` is not the standardisation variance. 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:17Z: `is_oa: false`; title *Measurement Invariance, Factor Analysis and Factorial Invariance*). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread (Unpaywall 2026-08-23T18:17Z: `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 `T0TIPREDEFFECTstd`; p. 16; footnote 4; Eq. 3, p. 5; 2017-era ctsem `summary.ctsemFit.R`; JSS PDF re-opened 2026-08-23T17:20Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar standardised first-occasion time-independent predictor effect. Table 3 names `T0TIPREDEFFECT` the effect of time-independent predictors on latents at `T0`. Page 16 prints standardised matrices with the suffix `std` when appropriate. Footnote 4: standardisations use only the relevant variance, not the total. The affecting variance is predictor variance `TIPREDVAR` `v`. The affected variance is free first-occasion `T0VAR` `p_0`, not within-subject `asymDIFFUSION` `-q / (2 a)`, because Table 3 is the first occasion, not the process dynamics. Form strictly positive `p_0` first, then strictly positive `v`, then `t0_b · √v / √p_0`. Unstandardised `t0_b` is defined for a zero coefficient and for zero predictor variance; standardised `T0TIPREDEFFECT` is not. Zero `p_0` or zero `v` 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`. The continuous standardisation `B · √v / √(-q / (2 a))` uses `asymDIFFUSION` and is not this first-occasion map. The asymptotic standardisation `(-B / a) · √v / √p` is the total change, not this first-occasion coefficient. Section 7.1 warns that omitting trait variance confounds between- and within-person information. `t0_b · √v / √(trait + p_0 + added)` uses the total, not free `T0VAR`, and is not `T0TIPREDEFFECTstd` when `TRAITVAR` is nonzero. `TRAITVAR` is not the standardisation variance. 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-23T17:20Z: `is_oa: false`; title *Measurement Invariance, Factor Analysis and Factorial Invariance*). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread (Unpaywall 2026-08-23T17:20Z: `is_oa: false`; title *Randomization-Based Inference about Latent Variables from Complex Samples*).
- `psychometric_core` recovers the Driver, Oud, and Voelkle (2017, p. 16 `TIPREDEFFECTstd`; §7.2, pp. 20–21; Eq. 3, p. 5; Table 2, p. 12; footnote 4; JSS PDF re-opened 2026-08-23T16:21Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar standardised continuous time-independent predictor effect. Page 16 prints continuous-time parameters and, when appropriate, standardised matrices with the suffix `std`. Table 2 names `B` `TIPREDEFFECT`. Footnote 4: standardisations use only the relevant variance, not the total. The affecting variance is predictor variance `TIPREDVAR` `v`. The affected variance is within-subject `asymDIFFUSION` `-q / (2 a)`, because the process dynamics are individual, or average individual, temporal dynamics. Form strictly positive `asymDIFFUSION` first, then strictly positive `v`, then `B · √v / √(-q / (2 a))`. Unstandardised `B` is defined for a zero coefficient and for zero predictor variance; standardised `TIPREDEFFECT` is not. Zero `asymDIFFUSION` or zero `v` has no positive SD and fails closed. The asymptotic standardisation `(-B / a) · √v / √p` is the total change, not this continuous coefficient. The finite-interval standardisation `A^{-1}[e^{A Δt} − I] B · √v / √p` depends on the event interval and is not this continuous map. Section 7.1 warns that omitting trait variance confounds between- and within-person information. `B · √v / √(trait + p + added)` uses the total, not `asymDIFFUSION`, and is not `TIPREDEFFECTstd` when `TRAITVAR` is nonzero. `TRAITVAR` is not the standardisation variance. 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-23T13:19Z: `is_oa: false`; title *Measurement Invariance, Factor Analysis and Factorial Invariance*). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread (Unpaywall 2026-08-23T13:19Z: `is_oa: false`; title *Randomization-Based Inference about Latent Variables from Complex Samples*).
- `psychometric_core` recovers the Driver, Oud, and Voelkle (2017, p. 16 `asymTIPREDEFFECTstd`; §7.2, pp. 20–21; Eq. 3, p. 5; Table 2, p. 12; footnote 4; JSS PDF re-opened 2026-08-23T14:25Z from https://www.jstatsoft.org/index.php/jss/article/download/v077i05/1104) scalar standardised asymptotic time-independent predictor effect. Page 16 prints continuous-time parameters and, when appropriate, standardised matrices with the suffix `std`. Section 7.2 names `asymTIPREDEFFECT` the expected total change in process means given a unit increase on a time-independent predictor. The scalar map is `-B / a` for stable `a < 0`. Footnote 4: standardisations use only the relevant variance, not the total. The affecting variance is predictor variance `TIPREDVAR` `v`. The affected variance is within-subject `asymDIFFUSION` `-q / (2 a)`, because the process dynamics are individual, or average individual, temporal dynamics. Form strictly positive `asymDIFFUSION` first, then strictly positive `v`, then the unit asymptotic effect, then `(-B / a) · √v / √(-q / (2 a))`. Unstandardised `-B / a` is defined for a zero coefficient and for zero predictor variance; standardised `asymTIPREDEFFECT` is not. Zero `asymDIFFUSION` or zero `v` has no positive SD and fails closed. The finite-interval standardisation `A^{-1}[e^{A Δt} − I] B · √v / √p` depends on the event interval and is not this `Δt → ∞` map. Section 7.1 warns that omitting trait variance confounds between- and within-person information. `(-B / a) · √v / √(trait + p + added)` uses the total, not `asymDIFFUSION`, and is not `asymTIPREDEFFECTstd` when `TRAITVAR` is nonzero. `TRAITVAR` is not the standardisation variance. 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-23T13:19Z: `is_oa: false`; title *Measurement Invariance, Factor Analysis and Factorial Invariance*). Mislevy (1991, *Psychometrika, 56*, 177–196) remains unread (Unpaywall 2026-08-23T13:19Z: `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.

82 changes: 82 additions & 0 deletions crates/psychometric_core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,36 @@ pub enum PsychometricError {
/// p. 16 `T0TIPREDEFFECTstd`. Footnote 4 uses only free `T0VAR`,
/// not `TRAITVAR`.
TraitContaminatedInitialTimeIndependentEffectIsNotStandardisedInitialTimeIndependentEffect,
/// Driver Table 3 / p. 16 `T0TDPREDEFFECTstd` was requested with
/// a non-positive free first-occasion variance. Footnote 4
/// standardises the affected first-occasion latent using only
/// strictly positive free `T0VAR`.
StandardisedInitialTimeDependentEffectRequiresPositiveInitialLatentVariance,
/// Driver Table 3 / p. 16 `T0TDPREDEFFECTstd` was requested with
/// a non-positive predictor variance. Footnote 4 standardises the
/// affecting predictor using only strictly positive `TDPREDVAR`.
StandardisedInitialTimeDependentEffectRequiresPositivePredictorVariance,
/// Driver Table 3 unstandardised `T0TDPREDEFFECT` `t0_m` was
/// treated as p. 16 `T0TDPREDEFFECTstd`. Unstandardised `t0_m`
/// is defined for a zero coefficient or zero predictor variance;
/// standardised `T0TDPREDEFFECT` is not.
UnstandardisedInitialTimeDependentEffectIsNotStandardisedInitialTimeDependentEffect,
/// Driver Table 3 / p. 16 `T0TIPREDEFFECTstd`
/// `t0_b · √v / √p_0` was treated as Table 3 / p. 16
/// `T0TDPREDEFFECTstd`. Same numbers yield the same product;
/// Table 3 names a different matrix. `TIPREDVAR` is not
/// `TDPREDVAR`.
StandardisedInitialTimeIndependentEffectIsNotStandardisedInitialTimeDependentEffect,
/// Driver p. 16 `TIPREDEFFECTstd`
/// `B · √v / √(-q / (2 a))` was treated as Table 3 / p. 16
/// `T0TDPREDEFFECTstd`. The continuous map uses `asymDIFFUSION`;
/// the first-occasion map uses free `T0VAR`.
StandardisedContinuousTimeIndependentEffectIsNotStandardisedInitialTimeDependentEffect,
/// Driver §7.1 trait-contaminated first-occasion TD effect
/// `t0_m · √v_x / √(trait + p_0 + added)` was treated as Table 3 /
/// p. 16 `T0TDPREDEFFECTstd`. Footnote 4 uses only free `T0VAR`,
/// not `TRAITVAR`.
TraitContaminatedInitialTimeDependentEffectIsNotStandardisedInitialTimeDependentEffect,
}

impl fmt::Display for PsychometricError {
Expand Down Expand Up @@ -1430,6 +1460,24 @@ impl fmt::Display for PsychometricError {
Self::TraitContaminatedInitialTimeIndependentEffectIsNotStandardisedInitialTimeIndependentEffect => {
"trait-contaminated initial time-independent predictor effect is not standardised initial time-independent predictor effect"
}
Self::StandardisedInitialTimeDependentEffectRequiresPositiveInitialLatentVariance => {
"standardised initial time-dependent predictor effect requires strictly positive initial latent variance"
}
Self::StandardisedInitialTimeDependentEffectRequiresPositivePredictorVariance => {
"standardised initial time-dependent predictor effect requires strictly positive predictor variance"
}
Self::UnstandardisedInitialTimeDependentEffectIsNotStandardisedInitialTimeDependentEffect => {
"unstandardised initial time-dependent predictor effect is not standardised initial time-dependent predictor effect"
}
Self::StandardisedInitialTimeIndependentEffectIsNotStandardisedInitialTimeDependentEffect => {
"standardised initial time-independent predictor effect is not standardised initial time-dependent predictor effect"
}
Self::StandardisedContinuousTimeIndependentEffectIsNotStandardisedInitialTimeDependentEffect => {
"standardised continuous time-independent predictor effect is not standardised initial time-dependent predictor effect"
}
Self::TraitContaminatedInitialTimeDependentEffectIsNotStandardisedInitialTimeDependentEffect => {
"trait-contaminated initial time-dependent predictor effect is not standardised initial time-dependent predictor effect"
}
};
formatter.write_str(message)
}
Expand Down Expand Up @@ -2458,4 +2506,38 @@ mod tests {
"trait-contaminated initial time-independent predictor effect is not standardised initial time-independent predictor effect"
);
}

#[test]
fn standardised_initial_time_dependent_effect_boundary_messages_are_stable() {
assert_eq!(
PsychometricError::StandardisedInitialTimeDependentEffectRequiresPositiveInitialLatentVariance
.to_string(),
"standardised initial time-dependent predictor effect requires strictly positive initial latent variance"
);
assert_eq!(
PsychometricError::StandardisedInitialTimeDependentEffectRequiresPositivePredictorVariance
.to_string(),
"standardised initial time-dependent predictor effect requires strictly positive predictor variance"
);
assert_eq!(
PsychometricError::UnstandardisedInitialTimeDependentEffectIsNotStandardisedInitialTimeDependentEffect
.to_string(),
"unstandardised initial time-dependent predictor effect is not standardised initial time-dependent predictor effect"
);
assert_eq!(
PsychometricError::StandardisedInitialTimeIndependentEffectIsNotStandardisedInitialTimeDependentEffect
.to_string(),
"standardised initial time-independent predictor effect is not standardised initial time-dependent predictor effect"
);
assert_eq!(
PsychometricError::StandardisedContinuousTimeIndependentEffectIsNotStandardisedInitialTimeDependentEffect
.to_string(),
"standardised continuous time-independent predictor effect is not standardised initial time-dependent predictor effect"
);
assert_eq!(
PsychometricError::TraitContaminatedInitialTimeDependentEffectIsNotStandardisedInitialTimeDependentEffect
.to_string(),
"trait-contaminated initial time-dependent predictor effect is not standardised initial time-dependent predictor effect"
);
}
}
Loading
Loading