Skip to content
Merged
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: true
matrix:
version:
- '1.7.3'
- '1'
os:
- ubuntu-latest
arch:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/CI_ecosystem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
fail-fast: false
matrix:
version:
- '1.7.3'
- '1'
- '1.9'
os:
- ubuntu-latest
- macos-latest
Expand All @@ -42,4 +43,4 @@ jobs:
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
file: lcov.info
file: lcov.info
5 changes: 3 additions & 2 deletions .github/workflows/CI_extended.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
fail-fast: false
matrix:
version:
- '1.7.3'
- '1'
- '1.9'
os:
- ubuntu-latest
- macos-latest
Expand All @@ -42,4 +43,4 @@ jobs:
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
file: lcov.info
file: lcov.info
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1.7.2'
version: '1'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/preview-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1.6'
version: '1'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
Expand All @@ -36,4 +36,4 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Docs can be previewed here: ${{ env.GHP_URL }}previews/PR${{ env.PR_NUMBER }}'
})
})
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "StructuralEquationModels"
uuid = "383ca8c5-e4ff-4104-b0a9-f7b279deed53"
authors = ["Maximilian Ernst", "Aaron Peikert"]
version = "0.1.0"
version = "0.2.0"

[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Expand All @@ -24,7 +24,7 @@ StenoGraphs = "78862bba-adae-4a83-bb4d-33c106177f81"
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"

[compat]
julia = "1.7"
julia = "1.9"
StenoGraphs = "0.2"
DataFrames = "1"
Distributions = "0.25"
Expand Down
1 change: 1 addition & 0 deletions src/StructuralEquationModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export AbstractSem,
SemConstant, SemWLS, loss,
SemOptimizer,
SemOptimizerEmpty, SemOptimizerOptim, SemOptimizerNLopt, NLoptConstraint,
optimizer, n_iterations, convergence,
SemObserved,
SemObservedData, SemObservedCovariance, SemObservedMissing, observed,
sem_fit,
Expand Down
9 changes: 7 additions & 2 deletions src/frontend/fit/standard_errors/hessian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function se_hessian(sem_fit::SemFit; hessian = :finitediff)
elseif hessian == :expected
throw(ArgumentError("standard errors based on the expected hessian are not implemented yet"))
else
throw(ArgumentError("I dont know how to compute `$how` standard-errors"))
throw(ArgumentError("I dont know how to compute `$hessian` standard-errors"))
end

invH = c*inv(H)
Expand All @@ -44,9 +44,14 @@ H_scaling(model::AbstractSemSingle) =
model.optimizer,
model.loss.functions...)

H_scaling(model, obs, imp, optimizer, lossfun::Union{SemML, SemWLS}) =
H_scaling(model, obs, imp, optimizer, lossfun::SemML) =
2/(n_obs(model)-1)

function H_scaling(model, obs, imp, optimizer, lossfun::SemWLS)
@warn "Standard errors for WLS are only correct if a GLS weight matrix (the default) is used."
return 2/(n_obs(model)-1)
end

H_scaling(model, obs, imp, optimizer, lossfun::SemFIML) =
2/n_obs(model)

Expand Down
1 change: 1 addition & 0 deletions src/imply/empty.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
############################################################################################
"""
Empty placeholder for models that don't need an imply part.
(For example, models that only regularize parameters.)

# Constructor

Expand Down
2 changes: 1 addition & 1 deletion test/examples/political_democracy/constraints.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ end
solution_constrained = sem_fit(model_ml_constrained)
@test solution_constrained.solution[31]*solution_constrained.solution[30] >= 0.6
@test all(abs.(solution_constrained.solution) .< 10)
@test_skip solution_constrained.optimization_result.result[3] == :FTOL_REACHED
@test solution_constrained.optimization_result.result[3] == :FTOL_REACHED skip=true
@test abs(solution_constrained.minimum - 21.21) < 0.01
end