Documentation and bugfixes for 0.5.0#329
Conversation
|
Docs can be previewed here: https://structuralequationmodels.github.io/StructuralEquationModels.jl/previews/PR329 |
|
Docs can be previewed here: https://structuralequationmodels.github.io/StructuralEquationModels.jl/previews/PR329 |
|
Docs can be previewed here: https://structuralequationmodels.github.io/StructuralEquationModels.jl/previews/PR329 |
|
@alyst this PR introduces some potentially breaking changes for you:
|
I think it should be fine as long as the constructor supports explicit SEM weights specification (Sem(..., id1 => loss1 => weight1, id2 => loss2 => weight2, ...). |
|
Docs can be previewed here: https://structuralequationmodels.github.io/StructuralEquationModels.jl/previews/PR329 |
Documentation update for the 0.5.0 API
Updates the docs to match the new model/type structure so they build and are accurate. The previous docs described the old "three parts" model and used the pre-0.5 API (
SemLossFunction,RAM(specification = …),SemLoss(ml)wrappers,evaluate!(…, model, …)), which no longer exists.Changes
Semis a weighted sum of loss terms (AbstractLoss), and eachSemLossbundles its ownobserved+implied(concept.md, extending.md, sem.md, types.md).RAM(spec)positional,SemML(observed, implied),Sem(loss_terms…), noSemLoss(...)wrapper (build_by_parts.md, meanstructure.md, outer_constructor.md).evaluate!interface (nomodelarg;SemLossholds observed/implied), and split theAbstractLossvsSemLossconstructor guidance (loss.md).@docs/@reftargets (CFI,em_mvn,LossTerm,FiniteDiffWrapper,AbstractSem/AbstractLoss) and small errors (fixed()notfix(),nparamsnotn_par,showoutput, file-tree paths, weighting schemes).FIML.jl,types.jl,EM.jl,empty.jl; added aFiniteDiffWrapperdocstring).Effect:
make.jlbuilds cleanly (no errors/unresolved refs); docs reflect the 0.5.0 API and architecture.Multigroup weighting & χ² correction
Aligns multigroup loss weighting and χ² with the Wishart convention (
χ² = Σ_g (N_g−1)·F_g), matching lavaan'slikelihood = "wishart"(ML) / GLS and the stored lavaan reference solutions. Previously a global(N−1)multiplier was applied to anN_g/N-weighted average of per-group fit functions, which was off-convention and inconsistent with the WLS correction.Changes
:nsamples_correctedweighting scheme, now the default forSem(viamultigroup_weights); plain:nsamplesstill available.multigroup_correction_scale(SemML):0 → −1(ML now uses per-groupN_g−1weighting andN−Gin RMSEA, like WLS; FIML stays0).SemMLandSemWLS:(N−1) → (N−G); reduces toN−1for a single group.Effect: multigroup ML now matches lavaan
wishartand WLS matches lavaan GLS (χ², RMSEA, estimates); FIML unchanged; single-group unchanged except ML RMSEA (n: N → N−1). Alltest/examplespass.Files:
Sem.jl(weighting),chi2.jl(χ² multipliers),collection.md(docs).