ehs-risk-sem
Back to ehs-risk-sem

fit_indices

FitIndices

FitIndices(chi_square: 'float', df: 'int', p_value: 'float', n_obs: 'int', f_ml: 'float', cfi: 'float', tli: 'float', rmsea: 'float', rmsea_lower: 'float', rmsea_upper: 'float', p_close_fit: 'float', srmr: 'float', aic: 'float', bic: 'float', n_free_parameters: 'int', baseline_chi_square: 'float', baseline_df: 'int', estimator: 'str' = 'limited-information two-step (not ML minimization)', notes: 'List[str]' = <factory>) -> None

Global fit statistics for a fitted model.

chi_square_critical

chi_square_critical(df: 'int', alpha: 'float' = 0.05) -> 'float'

Critical value of the central chi-square at level ``alpha``.

compute_fit_indices

compute_fit_indices(s: 'np.ndarray', sigma: 'np.ndarray', n_obs: 'int', df: 'int', n_free_parameters: 'int', estimator: 'str' = 'limited-information two-step (not ML minimization)', extra_notes: 'Optional[List[str]]' = None) -> 'FitIndices'

Compute the full set of fit indices for a fitted model.

The baseline (null) model for CFI and TLI is the independence model: all observed variances free, all covariances zero.

ml_discrepancy

ml_discrepancy(s: 'np.ndarray', sigma: 'np.ndarray') -> 'float'

Maximum-likelihood discrepancy between observed and implied matrices.

``F = log|Sigma| + tr(S Sigma^-1) - log|S| - p``, which is zero when ``Sigma == S`` and positive otherwise.

rmsea_ci

rmsea_ci(chi_square: 'float', df: 'int', n_obs: 'int', level: 'float' = 0.9) -> 'tuple'

Confidence interval for RMSEA by inverting the noncentral chi-square.

Finds noncentrality parameters ``lam_lo`` and ``lam_hi`` such that the noncentral chi-square CDF at the observed statistic equals the upper and lower tail probabilities, then converts each to the RMSEA scale via ``sqrt(lam / (df * (n - 1)))``.

srmr

srmr(s: 'np.ndarray', sigma: 'np.ndarray') -> 'float'

Standardized root mean square residual.

Root mean square of the residuals between the observed and implied correlation matrices, over the lower triangle including the diagonal.