Skip to content

Commit 0eb04ef

Browse files
Apply suggestions from formatter
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 20c8b63 commit 0eb04ef

5 files changed

Lines changed: 18 additions & 20 deletions

File tree

ext/SEMProximalOptExt/ProximalAlgorithms.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@ SEM.algorithm_name(
9393
SEM.convergence(
9494
::ProximalResult,
9595
) = "No standard convergence criteria for proximal \n algorithms available."
96-
SEM.converged(
97-
::ProximalResult,
98-
) = missing
96+
SEM.converged(::ProximalResult) = missing
9997
SEM.n_iterations(res::ProximalResult) = res.n_iterations
10098

10199
############################################################################################

src/frontend/fit/standard_errors/bootstrap.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function bootstrap(
4848
engine = :Optim,
4949
parallel = false,
5050
fit_kwargs = Dict(),
51-
replace_kwargs = Dict()
51+
replace_kwargs = Dict(),
5252
)
5353
# access data and convert to matrix
5454
data = prepare_data_bootstrap(data, fitted.model)
@@ -121,7 +121,8 @@ function bootstrap(
121121
:n_boot => n_boot,
122122
:n_converged => sum(conv),
123123
:converged => conv,
124-
:n_errored => n_failed[])
124+
:n_errored => n_failed[],
125+
)
125126
end
126127

127128
"""
@@ -171,7 +172,7 @@ function se_bootstrap(
171172
engine = :Optim,
172173
parallel = false,
173174
fit_kwargs = Dict(),
174-
replace_kwargs = Dict()
175+
replace_kwargs = Dict(),
175176
)
176177
# access data and convert to matrix
177178
data = prepare_data_bootstrap(data, fitted.model)
@@ -196,7 +197,7 @@ function se_bootstrap(
196197
sol = solution(new_fit)
197198
conv = converged(new_fit)
198199
if conv
199-
n_conv[] += 1
200+
n_conv[] += 1
200201
@. total_sum += sol
201202
@. total_squared_sum += sol^2
202203
end
@@ -228,7 +229,7 @@ function se_bootstrap(
228229
conv = converged(new_fit)
229230
if conv
230231
lock(lk) do
231-
n_conv[] += 1
232+
n_conv[] += 1
232233
@. total_sum += sol
233234
@. total_squared_sum += sol^2
234235
end

src/frontend/fit/standard_errors/confidence_intervals.jl

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,22 @@ Return normal-theory confidence intervals for all model parameters.
2121
"""
2222

2323
@doc "$(_doc_normal_CI)"
24-
function normal_CI(
25-
fitted, se; α = 0.05, name_lower = :ci_lower, name_upper = :ci_upper)
24+
function normal_CI(fitted, se; α = 0.05, name_lower = :ci_lower, name_upper = :ci_upper)
2625
qnt = quantile(Normal(0, 1), 1-α/2);
2726
sol = solution(fitted)
2827
return Dict(name_lower => sol - qnt*se, name_upper => sol + qnt*se)
2928
end
3029

3130
@doc "$(_doc_normal_CI)"
3231
function normal_CI!(
33-
partable,
34-
fitted,
35-
se;
36-
α = 0.05,
37-
name_lower = :ci_lower,
38-
name_upper = :ci_upper)
39-
cis = normal_CI(
40-
fitted, se; α, name_lower, name_upper)
32+
partable,
33+
fitted,
34+
se;
35+
α = 0.05,
36+
name_lower = :ci_lower,
37+
name_upper = :ci_upper,
38+
)
39+
cis = normal_CI(fitted, se; α, name_lower, name_upper)
4140
update_partable!(partable, name_lower, fitted, cis[name_lower])
4241
update_partable!(partable, name_upper, fitted, cis[name_upper])
4342
return cis

src/frontend/fit/standard_errors/z_test.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Tests the null hypothesis that each parameter is zero using the test statistic
2222

2323
@doc "$(_doc_z_test)"
2424
function z_test(fitted, se)
25-
dev = solution(fitted)./se
25+
dev = solution(fitted) ./ se
2626
dist = Normal(0, 1)
2727
p = 2*ccdf.(dist, abs.(dev))
2828
return p

test/examples/helper.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,4 @@ function smoketest_CI_z(model_fit, partable)
153153
se_he = se_hessian(model_fit)
154154
normal_CI!(partable, model_fit, se_he)
155155
z_test!(partable, model_fit, se_he)
156-
end
156+
end

0 commit comments

Comments
 (0)