File tree Expand file tree Collapse file tree
src/frontend/fit/fitmeasures Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""
2- AIC(sem_fit ::SemFit)
2+ AIC(fit ::SemFit)
33
4- Return the akaike information criterion.
4+ Calculate the *AIC* ([*Akaike information criterion*](https://en.wikipedia.org/wiki/Akaike_information_criterion)).
5+
6+ # See also
7+ [`fit_measures`](@ref)
58"""
6- AIC (sem_fit :: SemFit ) = minus2ll (sem_fit ) + 2 nparams (sem_fit )
9+ AIC (fit :: SemFit ) = minus2ll (fit ) + 2 nparams (fit )
Original file line number Diff line number Diff line change 11"""
2- BIC(sem_fit ::SemFit)
2+ BIC(fit ::SemFit)
33
4- Return the bayesian information criterion.
4+ Calculate the *BIC* ([*Bayesian information criterion*](https://en.wikipedia.org/wiki/Bayesian_information_criterion)).
5+
6+ # See also
7+ [`fit_measures`](@ref)
58"""
6- BIC (sem_fit :: SemFit ) = minus2ll (sem_fit ) + log (nsamples (sem_fit )) * nparams (sem_fit )
9+ BIC (fit :: SemFit ) = minus2ll (fit ) + log (nsamples (fit )) * nparams (fit )
Original file line number Diff line number Diff line change 11"""
22 RMSEA(fit::SemFit)
33
4- Return the RMSEA.
4+ Calculate the RMSEA ([*Root Mean Squared Error of Approximation*](https://meth.psychopen.eu/index.php/meth/article/download/2333/2333.html?inline=1#sec1)).
5+
6+ Uses the formula
7+ ```math
8+ \\ mathrm{RMSEA} = \\ sqrt{\\ frac{\\ chi^2 - N_{\\ mathrm{df}}}{N_{\\ mathrm{obs}} * N_{\\ mathrm{df}}}},
9+ ```
10+ where *χ²* is the chi-squared statistic, ``N_{\\ mathrm{df}}`` is the degrees of freedom,
11+ and ``N_{\\ mathrm{obs}}`` is the (corrected) number of observations
12+ for the SEM model.
13+
14+ # See also
15+ [`fit_measures`](@ref), [`χ²`](@ref), [`dof`](@ref)
16+
17+ # Extended help
18+
19+ For multigroup models, the correction proposed by J.H. Steiger is applied
20+ (see [Steiger, J. H. (1998). *A note on multiple sample extensions of the RMSEA fit index*](https://doi.org/10.1080/10705519809540115)).
521"""
622function RMSEA end
723
Original file line number Diff line number Diff line change 11"""
22 χ²(fit::SemFit)
33
4- Return the χ² value.
4+ Calculate the *χ²* (*chi-square*) value for the `fit`.
5+
6+ The *χ²* is a test statistic for the SEM goodness-of-fit.
7+ It compares the *implied* covariance matrix of the SEM model
8+ with the *observed* covariance matrix.
9+
10+ # See also
11+ [`fit_measures`](@ref)
512"""
613χ² (fit:: SemFit ) = χ² (fit, fit. model)
714
Original file line number Diff line number Diff line change 11"""
2- dof(sem_fit ::SemFit)
2+ dof(fit ::SemFit)
33 dof(model::AbstractSem)
44
5- Return the degrees of freedom.
5+ Get the *degrees of freedom* for the SEM model.
6+
7+ The *degrees of freedom* for the SEM with *N* observed variables is the difference
8+ between the number of non-redundant elements in the observed covariance matrix
9+ (*½N(N+1)*) and the number of model parameters, *q* ([`nparams(model)`](@ref nparams)).
10+ If the SEM also models the observed means, the formula becomes *½N(N+1) + N - q*.
11+
12+ # See also
13+ [`fit_measures`](@ref)
614"""
715function dof end
816
9- dof (sem_fit :: SemFit ) = dof (sem_fit . model)
17+ dof (fit :: SemFit ) = dof (fit . model)
1018
1119dof (model:: AbstractSem ) = n_dp (model) - nparams (model)
1220
Original file line number Diff line number Diff line change 11"""
2- minus2ll(sem_fit ::SemFit)
2+ minus2ll(fit ::SemFit)
33
4- Return the negative 2* log likelihood.
4+ Calculate the *-2⋅log(likelihood(fit))*.
5+
6+ # See also
7+ [`fit_measures`](@ref)
58"""
69function minus2ll end
710
Original file line number Diff line number Diff line change 11"""
2- p(sem_fit ::SemFit)
2+ p_value(fit ::SemFit)
33
4- Return the p value computed from the χ² test statistic.
4+ Calculate the *p*-value for the *χ²* test statistic.
5+
6+ # See also
7+ [`fit_measures`](@ref), [`χ²`](@ref)
58"""
6- p_value (sem_fit :: SemFit ) = ccdf (Chisq (dof (sem_fit )), χ² (sem_fit ))
9+ p_value (fit :: SemFit ) = ccdf (Chisq (dof (fit )), χ² (fit ))
You can’t perform that action at this time.
0 commit comments