Skip to content

Commit d00a65e

Browse files
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 537cf16 commit d00a65e

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

src/loss/WLS/WLS.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,12 @@ end
173173
### Recommended methods
174174
############################################################################################
175175

176-
function update_observed(lossfun::SemWLS, observed::SemObserved; recompute_V = true, kwargs...)
176+
function update_observed(
177+
lossfun::SemWLS,
178+
observed::SemObserved;
179+
recompute_V = true,
180+
kwargs...,
181+
)
177182
if recompute_V
178183
return SemWLS(;
179184
observed = observed,
@@ -188,6 +193,5 @@ function update_observed(lossfun::SemWLS, observed::SemObserved; recompute_V = t
188193
meanstructure = MeanStruct(kwargs[:implied]) == HasMeanStruct,
189194
kwargs...,
190195
)
191-
192196
end
193197
end

test/examples/helper.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ function test_estimates(
138138
end
139139

140140
function test_bootstrap(
141-
model_fit,
142-
spec;
143-
compare_hessian = true,
144-
rtol_hessian = 0.2,
145-
compare_bs = true,
146-
rtol_bs = 0.1,
147-
n_boot = 500,
148-
)
141+
model_fit,
142+
spec;
143+
compare_hessian = true,
144+
rtol_hessian = 0.2,
145+
compare_bs = true,
146+
rtol_bs = 0.1,
147+
n_boot = 500,
148+
)
149149
@testset rng = Random.seed!(32432) "bootstrap" begin
150150
se_bs = @suppress se_bootstrap(model_fit, spec; n_boot = n_boot)
151151
# hessian and bootstrap se are close
@@ -158,7 +158,7 @@ function test_bootstrap(
158158
if compare_bs
159159
bs_samples = bootstrap(model_fit, spec; n_boot = n_boot)
160160
@test bs_samples[:n_converged] >= 0.95*n_boot
161-
bs_samples =
161+
bs_samples =
162162
cat(bs_samples[:samples][BitVector(bs_samples[:converged])]..., dims = 2)
163163
se_bs_2 = sqrt.(var(bs_samples, corrected = false, dims = 2))
164164
#println(maximum(abs.(se_bs_2 - se_bs)))

test/examples/multigroup/build_models.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,6 @@ if !isnothing(specification_miss_g1)
419419
lav_groups = Dict(:Pasteur => 1, :Grant_White => 2),
420420
)
421421

422-
423422
solution = fit(semoptimizer, model_ml_multigroup2)
424423
test_fitmeasures(
425424
fit_measures(solution),

0 commit comments

Comments
 (0)