Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
393 commits
Select commit Hold shift + click to select a range
b8d9a8f
Optim sem_fit(): use provided optimizer
May 26, 2024
dd275d5
prepare_start_params(): arg-dependent dispatch
alyst Dec 19, 2024
0131bb7
prepare_param_bounds() API for optim
alyst Dec 19, 2024
fbdcc7f
u/l_bounds support for Optim.jl
alyst Dec 19, 2024
d1f323a
SemOptimizer(engine = ...) ctor
alyst Apr 14, 2024
0a6b073
SEMNLOptExt for NLopt
Apr 3, 2024
730eadc
NLopt: sem_fit(): use provided optimizer
alyst Nov 24, 2024
23e2265
SEMProximalOptExt for Proximal opt
alyst Dec 19, 2024
8a98831
merge diff/*.jl optimizer code into optimizer/*.jl
alyst Dec 20, 2024
9e2672d
Optim: document u/l bounds
alyst Dec 20, 2024
d618898
remove unused options field from Proximal optimizer
Maximilian-Stefan-Ernst Dec 19, 2024
d055c78
decouple optimizer from Sem model
alyst Dec 20, 2024
71bced7
fix inequality constraints test
alyst Nov 24, 2024
928af39
add ProximalSEM tests
Maximilian-Stefan-Ernst Dec 20, 2024
c19c4a7
optim/documentation.jl: rename to abstract.jl
alyst Dec 20, 2024
c5b48c7
ext: change folder layout
alyst Dec 20, 2024
b839635
Merge pull request #228 from alyst/optim_extensions
Maximilian-Stefan-Ernst Dec 22, 2024
d5357f0
Project.toml: fix ProximalOperators ID
alyst Dec 24, 2024
48a744f
docs: fix nsamples, nobserved_vars
alyst Aug 1, 2024
5faf116
cleanup data columns reordering
alyst Mar 20, 2024
30e0b24
SemObservedCov: def as an alias of SemObservedData
alyst Jan 1, 2025
86c5e2d
SemObserved: store observed_vars
May 9, 2024
ef1861e
nsamples(observed::SemObserved): unify
May 9, 2024
1d573a3
FIML: simplify index generation
alyst Dec 25, 2024
b825667
SemObservedMissing: refactor
alyst Dec 25, 2024
a848ed3
remove cov_and_mean(): not used anymore
alyst Mar 18, 2024
c952792
SemObserved: unify data preparation
alyst Jan 1, 2025
2596c61
tests: update SemObserved tests
alyst Dec 28, 2024
80a64c9
prep_data: warn if obs_vars order don't match spec
alyst Jan 1, 2025
673aa2b
SemObsData: observed_var_prefix kwarg
alyst Dec 25, 2024
8c7cd14
ParTable: add graph-based kw-only constructor
Maximilian-Stefan-Ernst Jan 2, 2025
ff67cf7
Project.toml: fix ProximalAlgorithms to 0.5
alyst Jan 6, 2025
d3915c1
Merge pull request #230 from alyst/enhance_data_import
Maximilian-Stefan-Ernst Jan 9, 2025
e63d5d8
switch to ProximalAlgorithms.jl v0.7
alyst Jan 6, 2025
e2d6aa1
move params() to common.jl
alyst Aug 11, 2024
92b5741
RAM ctor: use random parameters instead of NaNs
Apr 1, 2024
ae2291a
move check_acyclic() to abstract.jl
alyst Jun 13, 2024
3175257
AbstractSem: improve imply/observed API redirect
alyst Dec 22, 2024
c8b1645
imply -> implied, SemImply -> SemImplied
alyst Jan 9, 2025
39aee3d
imply -> implied: file renames
alyst Dec 23, 2024
1fe165b
close #158
Maximilian-Stefan-Ernst Feb 2, 2025
e051d71
close #232
Maximilian-Stefan-Ernst Feb 2, 2025
03416eb
Merge pull request #240 from StructuralEquationModels/rename_sem_summary
Maximilian-Stefan-Ernst Feb 2, 2025
ba9390f
Merge pull request #235 from alyst/implied_rename
Maximilian-Stefan-Ernst Feb 2, 2025
8b0f880
Update ext/SEMProximalOptExt/ProximalAlgorithms.jl
Maximilian-Stefan-Ernst Feb 2, 2025
351fd70
Merge pull request #234 from alyst/prox_algo_07
Maximilian-Stefan-Ernst Feb 2, 2025
8c703d6
suppress uninformative warnings during package testing
Maximilian-Stefan-Ernst Feb 2, 2025
ba9d2c9
turn simplification of symbolic terms by default off
Maximilian-Stefan-Ernst Feb 3, 2025
cd6413b
new version of StenoGraph results in fewer deprication notices
aaronpeikert Feb 3, 2025
5bebe4e
Merge pull request #241 from StructuralEquationModels/test_warnings
Maximilian-Stefan-Ernst Feb 3, 2025
9244edf
Merge pull request #244 from StructuralEquationModels/make_simplify_o…
Maximilian-Stefan-Ernst Feb 3, 2025
f0df653
fix exporting structs from package extensions
Maximilian-Stefan-Ernst Feb 4, 2025
81a4bd9
fix NLopt extension
Maximilian-Stefan-Ernst Feb 4, 2025
9729819
fix Proximal extension
Maximilian-Stefan-Ernst Feb 4, 2025
127da26
fix printing
Maximilian-Stefan-Ernst Feb 4, 2025
f67d48c
fix regularization docs
Maximilian-Stefan-Ernst Feb 4, 2025
bcfae6a
Merge pull request #246 from StructuralEquationModels/fix_extensions
Maximilian-Stefan-Ernst Feb 4, 2025
0659738
Merge pull request #247 from StructuralEquationModels/devel
Maximilian-Stefan-Ernst Feb 4, 2025
e9dbb62
start reworking docs
Maximilian-Stefan-Ernst Feb 4, 2025
cca2496
finish rewriting docs
Maximilian-Stefan-Ernst Feb 4, 2025
b91f25a
rm ProximalSEM from docs deps
Maximilian-Stefan-Ernst Feb 4, 2025
56650e7
fix docs
Maximilian-Stefan-Ernst Feb 4, 2025
0f09635
fix docs
Maximilian-Stefan-Ernst Feb 4, 2025
5cc61bb
try to fix svgs for docs
Maximilian-Stefan-Ernst Feb 4, 2025
a4b7fe6
try to fix svgs for docs
Maximilian-Stefan-Ernst Feb 4, 2025
a8ae75c
Merge pull request #248 from StructuralEquationModels/documentation/0…
Maximilian-Stefan-Ernst Feb 4, 2025
b327012
update README
Maximilian-Stefan-Ernst Feb 4, 2025
4091804
bump version
Maximilian-Stefan-Ernst Feb 4, 2025
955a181
give macos some slack and format
Maximilian-Stefan-Ernst Feb 4, 2025
cbb666b
Rename params (#253)
aaronpeikert Mar 17, 2025
8cbd504
merge main into devel
Maximilian-Stefan-Ernst Apr 14, 2025
d4fcf2a
main into devel (#265)
Maximilian-Stefan-Ernst May 11, 2025
56f0567
Documentation/fix docstrings (#260)
Maximilian-Stefan-Ernst Apr 15, 2025
f595ceb
Replace observed collections (#266)
Maximilian-Stefan-Ernst May 12, 2025
fa2e0b8
fix conflicts
Maximilian-Stefan-Ernst Oct 15, 2025
a0197a3
explicitely import types for extensions (#291)
Maximilian-Stefan-Ernst Dec 30, 2025
e4b78b5
workaround for StenoGraph import
Maximilian-Stefan-Ernst Jan 15, 2026
27bdbce
throw sensible errors when missings or meanstructure are used incorre…
Maximilian-Stefan-Ernst Jan 15, 2026
db4e86e
fix model construction unit tests
Maximilian-Stefan-Ernst Jan 15, 2026
998b04b
simplify update_partable! syntax
Maximilian-Stefan-Ernst Dec 30, 2025
8f443e2
gh/FormatCheck: update to julia-format@v4
Jan 20, 2026
5d14c4e
gh/FormatCheck: update JuliaFormatter to v2
Jan 20, 2026
326c77c
gh/FormatCheck: always show suggestions
Jan 20, 2026
9f41f92
update concept figures
Maximilian-Stefan-Ernst Jan 22, 2026
8f2a101
add SemOptimizerProximal to table
Maximilian-Stefan-Ernst Jan 22, 2026
9da45e4
No-op code & docs cleanups (#245)
alyst Jan 27, 2026
453fcc9
Revert "fix Proximal extension"
alyst Mar 22, 2025
abc2847
Revert "fix NLopt extension"
alyst Mar 22, 2025
56cdef1
Revert "fix exporting structs from package extensions"
alyst Mar 22, 2025
421927e
types.jl: move SemOptimizer API into abstract.jl
alyst Mar 22, 2025
84bd7bd
NLoptResult should not be mutable
alyst Mar 22, 2025
930e0e5
SemNLOpt: use f or f => tol pair for constraints
alyst Mar 22, 2025
230af39
NLopt: cleanup docstring
Feb 5, 2026
d1355a0
NLopt: update/simplify docs
Feb 5, 2026
6f3ccd5
Optim.md: SemOptimizerOptim => SemOptimizer
alyst Mar 22, 2025
242c602
regulariz.md: SemOptimProx => SemOptimizer
alyst Mar 22, 2025
3e5c9ac
optimizer_engine(): rename and fix signature
Jan 27, 2026
9471fbe
optimizer_engines(): new method
Jan 27, 2026
f4f9280
export optmizer_engine()
Feb 3, 2026
41c1308
sem_optimizer_subtype(engine)
Feb 3, 2026
a1cf400
streamline engine error throwing
Feb 5, 2026
efd4911
SemOptimizer{E}: remove docstring
Feb 5, 2026
3410853
SemOptimizer: cleanup docstrings
Jan 27, 2026
6ba91f4
optimizer_engine_doc()
Feb 5, 2026
2e5c9b3
fix proximal extension
Maximilian-Stefan-Ernst Jan 30, 2026
e47a94f
don't export SemOptimizerOptim
Feb 5, 2026
309c578
SemFit: add opt_engine() to the output
Feb 5, 2026
38939b7
SemOptimizerResult: streamline optim results
Feb 5, 2026
ccbf55f
docs: fix optimizer engine docs
Jan 27, 2026
1327236
docs/make.jl: disable doctest
alyst Feb 4, 2026
2f2293c
optimizer.md: rename to SemOptimizerMyopt
Feb 3, 2026
5cdcbb1
docs: apply suggestions
Feb 3, 2026
f1f453c
dovs/optimizer.md: more updates for the new API
Feb 5, 2026
1f8d2a9
.gh/FormatCheck: run on pull_request
Feb 6, 2026
90a8009
Merge pull request #299 from alyst/refactor_semopt_api
Maximilian-Stefan-Ernst Feb 8, 2026
811ae0f
improve meanstructure error message
Maximilian-Stefan-Ernst Feb 13, 2026
9997387
Merge pull request #304 from StructuralEquationModels/fiml_meanstruct…
Maximilian-Stefan-Ernst Feb 13, 2026
fc2bc16
add docstring for
Maximilian-Stefan-Ernst Feb 13, 2026
61acab6
add docstring for
Maximilian-Stefan-Ernst Feb 13, 2026
fd616cb
Merge branch 'devel' into documentation/misc
Maximilian-Stefan-Ernst Feb 13, 2026
358f6b1
Merge pull request #297 from StructuralEquationModels/documentation/misc
Maximilian-Stefan-Ernst Feb 13, 2026
90c6cf3
fix printing of Optim solution
Maximilian-Stefan-Ernst Feb 14, 2026
57ec89b
add helper functions for heterogenous lossfuns and scaling corrections
Maximilian-Stefan-Ernst Feb 15, 2026
1db3106
adapt default multigroup weights and give info about defaults used
Maximilian-Stefan-Ernst Feb 15, 2026
8b5de2e
refactor minus2ll
Maximilian-Stefan-Ernst Feb 15, 2026
f13704e
refactor minus2ll
Maximilian-Stefan-Ernst Feb 15, 2026
618e2df
refactor chi2
Maximilian-Stefan-Ernst Feb 15, 2026
c63ca4c
refactor RMSEA
Maximilian-Stefan-Ernst Feb 15, 2026
e8c867b
adapt mg models and fitmeasures
Maximilian-Stefan-Ernst Feb 16, 2026
f433924
build(deps): bump actions/checkout from 4 to 6
dependabot[bot] Nov 24, 2025
f1401bd
build(deps): bump actions/github-script from 7 to 8
dependabot[bot] Sep 8, 2025
3cd1a6d
require StenoGraphs v0.5; closes #289
aaronpeikert Feb 18, 2026
c116954
remove unused Stenograph exports
Maximilian-Stefan-Ernst Feb 18, 2026
787638b
FIML: SemFIMLPattern
alyst Feb 4, 2025
f599442
EM: optimizations
Mar 20, 2024
56834b5
EM MVN: decouple from SemObsMissing
alyst Dec 22, 2024
79c8041
ObsMissing: docstring update
Feb 9, 2026
249bcce
EM MVN: further optimizations
Apr 17, 2024
4bc93f8
trunc_eigvals(): new helper func
Feb 9, 2026
3e1049d
em_mvn(): min_eigval to enforce pos-def
Feb 9, 2026
d02ff3a
add ProgressMeter dep
Feb 9, 2026
64c7f4c
em_mvn(): verbose arg and progress bar
Feb 9, 2026
405a64c
test/fiml: set EM MVN rtol=1e-10
alyst Apr 14, 2024
c0cda00
SemObsMissing: fix obs_mean() test
alyst Aug 11, 2024
9b05e61
em_step!(): enforce symmetry
Feb 13, 2026
4d8d40e
SemML&WLS: warn if SemObsMissing
alyst Feb 16, 2026
36b88e6
SemObservedData: fix ws and msg indent
Mar 17, 2024
1d51d9a
fit_measures(): formatting tweaks
May 27, 2024
1d9bc28
improve docstrings for fit measures
Aug 31, 2024
f265452
add helper functions for heterogenous lossfuns and scaling corrections
Maximilian-Stefan-Ernst Feb 15, 2026
b93db77
adapt default multigroup weights and give info about defaults used
Maximilian-Stefan-Ernst Feb 15, 2026
2c66951
refactor minus2ll
Maximilian-Stefan-Ernst Feb 15, 2026
2039c11
refactor minus2ll
Maximilian-Stefan-Ernst Feb 15, 2026
8d65c80
refactor chi2
Maximilian-Stefan-Ernst Feb 15, 2026
d84d41d
refactor RMSEA
Maximilian-Stefan-Ernst Feb 15, 2026
c62e073
adapt mg models and fitmeasures
Maximilian-Stefan-Ernst Feb 16, 2026
d601530
Apply suggestion from @github-actions[bot]
Maximilian-Stefan-Ernst Feb 19, 2026
7942c1f
Apply suggestion from @github-actions[bot]
Maximilian-Stefan-Ernst Feb 19, 2026
efd0a4d
Apply suggestion from @github-actions[bot]
Maximilian-Stefan-Ernst Feb 19, 2026
e628276
add CFI
Maximilian-Stefan-Ernst Mar 8, 2026
5d80ee6
Merge branch 'devel' into add_CFI
Maximilian-Stefan-Ernst Mar 8, 2026
0c447da
add docstring for CFI
Maximilian-Stefan-Ernst Mar 8, 2026
7334a6b
Apply suggestions from formatter
Maximilian-Stefan-Ernst Mar 8, 2026
cec8658
Update src/frontend/fit/fitmeasures/CFI.jl
Maximilian-Stefan-Ernst Mar 8, 2026
17a8d0f
refactor bootstrap se and allow parallel fitting
Maximilian-Stefan-Ernst Mar 9, 2026
ead681f
Apply suggestions from formatter
Maximilian-Stefan-Ernst Mar 9, 2026
b7398ed
update to PrettyTable v3
Maximilian-Stefan-Ernst Mar 9, 2026
ad8a8c1
add converged method
Maximilian-Stefan-Ernst Mar 9, 2026
8a9a81b
refactor bootstrap and add bootstrap for any statistic
Maximilian-Stefan-Ernst Mar 9, 2026
1282156
add CI and p values
Maximilian-Stefan-Ernst Mar 9, 2026
2a3ceb6
add exports
Maximilian-Stefan-Ernst Mar 9, 2026
163eee7
add boostrap, CI and p-values tests
Maximilian-Stefan-Ernst Mar 9, 2026
43bb312
Apply suggestions from formatter
Maximilian-Stefan-Ernst Mar 9, 2026
cf2f514
fix bootstrap tests
Maximilian-Stefan-Ernst Mar 9, 2026
add4739
fix bootstrap tests
Maximilian-Stefan-Ernst Mar 9, 2026
8344058
fix nobs var check in update_observed, keep previous args in update_o…
Maximilian-Stefan-Ernst Mar 12, 2026
2c5549a
increase tolerance for bootstrap test
Maximilian-Stefan-Ernst Mar 12, 2026
b4cc3a3
increase tolerance for bootstrap test
Maximilian-Stefan-Ernst Mar 12, 2026
6f4ac26
remove bootstrap try-catch and update tests
Maximilian-Stefan-Ernst Mar 12, 2026
ea2d876
fix bootstrap
Maximilian-Stefan-Ernst Mar 12, 2026
95e1776
fix bootstrap
Maximilian-Stefan-Ernst Mar 12, 2026
d1ac265
fix bootstrap
Maximilian-Stefan-Ernst Mar 12, 2026
b75adc5
fix mg weights
Maximilian-Stefan-Ernst Mar 13, 2026
23ad54d
fix bootstrap tests
Maximilian-Stefan-Ernst Mar 20, 2026
41e428b
fix bootstrap tests
Maximilian-Stefan-Ernst Mar 20, 2026
4e011b2
add WLS option to fix weight matrix for updaeting observed data
Maximilian-Stefan-Ernst Mar 20, 2026
a42d5d5
narrower output types and remove locks for bootstrap + code formatting
Maximilian-Stefan-Ernst Mar 20, 2026
0399855
Apply suggestions from code review
Maximilian-Stefan-Ernst Mar 20, 2026
d1a9bcd
Project.toml: support Symbolics v7 & Utils v4
Mar 21, 2026
97728be
prepare_start_params(): tighten type check
Mar 21, 2026
f430ec2
SemImplied/SemLossFun: drop meanstructure kwarg
alyst Mar 21, 2026
6031dcc
refactor Sem, SemEnsemble, SemLoss
alyst Mar 21, 2026
9c82277
params/param_labels(): use both as synonyms for now
Mar 21, 2026
2b5010e
check_same_semterm_type(): refactor check_single_lossfun()
Mar 21, 2026
c5f1216
update multi-group correction
Mar 21, 2026
a59befd
replace_observed(): simplify & refactor
Mar 21, 2026
62e5633
bootstrap: sync with Sem updates
Mar 22, 2026
0aba9c1
CFI: sync with Sem refactor
Mar 22, 2026
77f1e52
test/build_models: remove redundant model
Mar 22, 2026
54ce4ad
revert using
Mar 22, 2026
b2cfbeb
WLS: verbose option
Mar 22, 2026
1cf97f5
docs: sync with Sem refactor
Mar 22, 2026
a402beb
test: fix formatting
Mar 22, 2026
42045dc
fit_measures(): support vectors of funcs
Mar 23, 2026
4b5942f
test_fitmeasures(): refactor/simplify
Mar 23, 2026
7439054
test/multigroup: small tweaks
Mar 23, 2026
5b3398d
finite_diff: replace_observed()
Mar 30, 2026
9f37609
replace_observed(): support kwargs
Mar 30, 2026
64eca20
replace_observed(SemWLS, ...; update_internal_state)
Mar 30, 2026
8e99cee
tests/model: replace_observed() kwargs passing
Mar 30, 2026
828e291
replace_observed(...; recompute_obs_state=true)
Mar 30, 2026
95eeb6f
tests/model: test multi-group data ctor
Mar 31, 2026
652d544
SemFiniteDiff constructor to keep same Syntax
Maximilian-Stefan-Ernst Mar 25, 2026
27ce0b0
Sem print methods
Maximilian-Stefan-Ernst Mar 25, 2026
46dd2ef
add details method for AbstractSem
Maximilian-Stefan-Ernst Apr 10, 2026
c052d61
shorten model
Maximilian-Stefan-Ernst Apr 11, 2026
b3242ff
Sem(): remove SemWLS kw check logic
Apr 13, 2026
0c95fd6
Sem(): cleanup constructor
Apr 13, 2026
eeaf32c
show(::Sem): respect existing :compact key
Apr 13, 2026
5eabccd
add show method for AbstractSem
Maximilian-Stefan-Ernst Apr 25, 2026
bcebd2b
simulation.md: whitespace fixes
alyst May 3, 2026
1304705
replace_obs(sem): make sure Sem type is preserved
alyst May 3, 2026
6a906b3
replace_obs(sem): update docstring
alyst May 3, 2026
5989dcf
replace_obs(loss): extract check_obs_vars() method
alyst May 3, 2026
1b3b8b5
test/multigroup: avoid clash with observed_vars() method
alyst May 4, 2026
ca8a517
SemLoss(observed, implied, refloss; kwarg...) ctor
alyst May 4, 2026
6eed309
replace_observed(): use 3-arg SemLoss ctor
alyst May 4, 2026
c209f8f
boostrap!(): deepcopy the sem
alyst May 4, 2026
4f3ab7b
unit_tests/model: more config-preserving tests
alyst May 4, 2026
05f00f1
tests: replace_observed(UserSemML)
alyst May 4, 2026
cd44e6a
show(ParTable): fix formatting
alyst May 4, 2026
a677c16
small bug fix
Maximilian-Stefan-Ernst May 11, 2026
d11bbdb
update docstrings for API changes
Maximilian-Stefan-Ernst Jun 16, 2026
da85b5c
update docs for API changes
Maximilian-Stefan-Ernst Jun 16, 2026
c54f3ae
update SEM concept figures
Maximilian-Stefan-Ernst Jun 17, 2026
a333096
update dependency versions
Maximilian-Stefan-Ernst Jun 17, 2026
2e7fd30
update optim syntax
Maximilian-Stefan-Ernst Jun 17, 2026
4c545d4
add compat entries
Maximilian-Stefan-Ernst Jun 18, 2026
5b6b10f
fix ml mg weights and chi2 weights to match lavaan
Maximilian-Stefan-Ernst Jun 18, 2026
cd01725
further doc updates
Maximilian-Stefan-Ernst Jun 18, 2026
8e895b1
remove references to ordinal data
Maximilian-Stefan-Ernst Jun 19, 2026
85f339e
add return type to evaluate docstring
Maximilian-Stefan-Ernst Mar 21, 2026
e8bdc5e
add docs for p-values and CI
Maximilian-Stefan-Ernst Jun 20, 2026
f186e41
fix ImpliedEmpty and add ParameterTable to docs
Maximilian-Stefan-Ernst Jun 20, 2026
d902ad7
Merge branch 'main' into devel
Maximilian-Stefan-Ernst Jun 20, 2026
d81dcf0
bump version number
Maximilian-Stefan-Ernst Jun 20, 2026
bba0d25
fix FIML fit_measures
Maximilian-Stefan-Ernst Jun 20, 2026
92346ee
fix docs typo
Maximilian-Stefan-Ernst Jun 20, 2026
1dba1f0
fix fiml fitmeasures test
Maximilian-Stefan-Ernst Jun 20, 2026
f6fcdb7
improve explanation on replace_observed
Maximilian-Stefan-Ernst Jun 21, 2026
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
20 changes: 12 additions & 8 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
name = "StructuralEquationModels"
uuid = "383ca8c5-e4ff-4104-b0a9-f7b279deed53"
authors = ["Maximilian Ernst", "Aaron Peikert"]
version = "0.4.2"
version = "0.5.0"

[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
LineSearches = "d3d80556-e9d4-5f37-9878-2ab0fcc64255"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NLSolversBase = "d41bc354-129a-5804-8e4c-c37616107c6c"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Expand All @@ -25,21 +27,23 @@ Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"

[compat]
julia = "1.9, 1.10, 1.11"
StenoGraphs = "0.2 - 0.3, 0.4.1 - 0.5"
julia = "1.10, 1.11, 1.12"
StenoGraphs = "0.5"
DataFrames = "1"
Distributions = "0.25"
FiniteDiff = "2"
LineSearches = "7"
NLSolversBase = "7"
NLSolversBase = "8"
NLopt = "0.6, 1"
Optim = "1"
PrettyTables = "2"
Optim = "2"
PrettyTables = "3"
ProximalAlgorithms = "0.7"
StatsBase = "0.33, 0.34"
Symbolics = "4, 5, 6"
SymbolicUtils = "1.4 - 1.5, 1.7, 2, 3"
Symbolics = "4, 5, 6, 7"
SymbolicUtils = "1.4 - 1.5, 1.7, 2, 3, 4"
StatsAPI = "1"
DelimitedFiles = "1"
Statistics = "1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
13 changes: 7 additions & 6 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
using Documenter, StructuralEquationModels
using Documenter, StructuralEquationModels, NLopt, ProximalAlgorithms, ProximalOperators

SEM = StructuralEquationModels
SEMNLOptExt = Base.get_extension(StructuralEquationModels, :SEMNLOptExt)
SEMProximalOptExt = Base.get_extension(StructuralEquationModels, :SEMProximalOptExt)

makedocs(
sitename = "StructuralEquationModels.jl",
modules = [SEM, SEMNLOptExt, SEMProximalOptExt],
pages = [
"index.md",
"Tutorials" => [
Expand Down Expand Up @@ -47,11 +52,6 @@ makedocs(
"Starting values" => "performance/starting_values.md",
"Parametric Types" => "performance/parametric.md",
],
"Internals and design" => [
"Internals and design" => "internals/internals.md",
"files" => "internals/files.md",
"types" => "internals/types.md",
],
],
format = Documenter.HTML(
prettyurls = get(ENV, "CI", nothing) == "true",
Expand All @@ -60,6 +60,7 @@ makedocs(
collapselevel = 1,
),
doctest = false,
checkdocs = :none,
)

# doctest(StructuralEquationModels, fix=true)
Expand Down
309 changes: 146 additions & 163 deletions docs/src/assets/concept.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
307 changes: 144 additions & 163 deletions docs/src/assets/concept_typed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions docs/src/developer/extending.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Extending the package

As discussed in the section on [Model Construction](@ref), every Structural Equation Model (`Sem`) consists of three (four with the optimizer) parts:
As discussed in [Our Concept of a Structural Equation Model](@ref), a `Sem` is built from one or more loss
terms, and each SEM loss function bundles an *observed* and an *implied* part:

![SEM concept typed](../assets/concept_typed.svg)

On the following pages, we will explain how you can define your own custom parts and "plug them in". There are certain things you **have to do** to define custom parts and some things you **can do** to have a more pleasent experience. In general, these requirements fall into the categories
On the following pages, we will explain how you can define your own custom parts (a loss function, an observed
type, an implied type, or an optimizer) and "plug them in". There are certain things you **have to do** to define custom parts and some things you **can do** to have a more pleasent experience. In general, these requirements fall into the categories
- minimal (to use your custom part and fit a `Sem` with it)
- use the outer constructor to build a model in a more convenient way
- use additional functionality like standard errors, fit measures, etc.
33 changes: 12 additions & 21 deletions docs/src/developer/implied.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ end
and a method to update!:

```julia
import StructuralEquationModels: objective!
import StructuralEquationModels: update!

function update!(targets::EvaluationTargets, implied::MyImplied, model::AbstractSemSingle, params)
function update!(targets::EvaluationTargets, implied::MyImplied, params)

if is_objective_required(targets)
...
Expand All @@ -31,12 +31,10 @@ function update!(targets::EvaluationTargets, implied::MyImplied, model::Abstract
end
```

As you can see, `update` gets passed as a first argument `targets`, which is telling us whether the objective value, gradient, and/or hessian are needed.
As you can see, `update!` gets passed as a first argument `targets`, which is telling us whether the objective value, gradient, and/or hessian are needed.
We can then use the functions `is_..._required` and conditional on what the optimizer needs, we can compute and store things we want to make available to the loss functions. For example, as we have seen in [Second example - maximum likelihood](@ref), the `RAM` implied type computes the model-implied covariance matrix and makes it available via `implied.Σ`.



Just as described in [Custom loss functions](@ref), you may define a constructor. Typically, this will depend on the `specification = ...` argument that can be a `ParameterTable` or a `RAMMatrices` object.
Just as described in [Custom loss functions](@ref), you may define a constructor. It should take the model specification (a `ParameterTable` or a `RAMMatrices` object) as the first positional argument, like the built-in [`RAM`](@ref) — this is how the outer `Sem` constructor builds the implied part when you select it by type (e.g. `implied = MyImplied`).

We implement an `ImpliedEmpty` type in our package that does nothing but serving as an `implied` field in case you are using a loss function that does not need any implied type at all. You may use it as a template for defining your own implied type, as it also shows how to handle the specification objects:

Expand All @@ -45,19 +43,18 @@ We implement an `ImpliedEmpty` type in our package that does nothing but serving
### Types
############################################################################################
"""
Empty placeholder for models that don't need an implied part.
(For example, models that only regularize parameters.)
Empty placeholder for loss functions that don't need an implied part.

# Constructor

ImpliedEmpty(;specification, kwargs...)
ImpliedEmpty(specification; kwargs...)

# Arguments
- `specification`: either a `RAMMatrices` or `ParameterTable` object

# Examples
A multigroup model with ridge regularization could be specified as a `SemEnsemble` with one
model per group and an additional model with `ImpliedEmpty` and `SemRidge` for the regularization part.
A multigroup model with ridge regularization could be specified as a `Sem` with one
SEM term (`SemLoss`) per group and an additional `SemRidge` regularization term.

# Extended help

Expand All @@ -75,8 +72,8 @@ end
### Constructors
############################################################################################

function ImpliedEmpty(;
specification,
function ImpliedEmpty(
specification::SemSpecification;
meanstruct = NoMeanStruct(),
hessianeval = ExactHessian(),
kwargs...,
Expand All @@ -88,13 +85,7 @@ end
### methods
############################################################################################

update!(targets::EvaluationTargets, implied::ImpliedEmpty, par, model) = nothing

############################################################################################
### Recommended methods
############################################################################################

update_observed(implied::ImpliedEmpty, observed::SemObserved; kwargs...) = implied
update!(targets::EvaluationTargets, implied::ImpliedEmpty, par) = nothing
```

As you see, similar to [Custom loss functions](@ref) we implement a method for `update_observed`.
As you see, similar to [Custom loss functions](@ref) we implement a constructor.
Loading
Loading