Skip to content

Commit 4a70667

Browse files
change from fit_stats to results (#124)
1 parent b8c7b91 commit 4a70667

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

examples/ane.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ initial_params = dynamic_initial_params(y_train, gas)
1919
f = ScoreDrivenModels.fit!(gas, y_train; initial_params=initial_params)
2020

2121
# Print estimation statistics
22-
fit_stats(f)
22+
results(f)
2323

2424
# Simulate 1000 future scenarios and obtain the 5% and 95% quantiles in each time period
2525
forec = forecast(y_train, gas, 60; S=1000, initial_params=initial_params)

examples/cpichg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ gas = Model(1, 1, TDistLocationScale, 0.0, time_varying_params=[1, 2])
2727
f = fit!(gas, y; opt_method=LBFGS(gas, 5))
2828

2929
# Print estimation statistics
30-
fit_stats(f)
30+
results(f)
3131

3232
# Perform forecast via simulations for 12 time periods ahead
3333
forec = forecast(y, gas, 12)

examples/garch.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ f = fit!(
4343
)
4444

4545
# Print estimation statistics
46-
fit_stats(f)
46+
results(f)

src/MLE.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export fit, fit!, fit_stats
1+
export fit, fit!, results
22

33
const DEFAULT_INITIAL_PARAM = NaN.*ones(1, 1)
44
const DEFAULT_NUM_SEEDS = 3
@@ -32,7 +32,7 @@ struct EstimationStats{D <: Distribution, T <: AbstractFloat}
3232
coefs_stats::CoefsStats{T}
3333
end
3434

35-
function fit_stats(f::Fitted{D, T}) where {D, T}
35+
function results(f::Fitted{D, T}) where {D, T}
3636
estim_results = eval_coefs_stats(f)
3737
np = length(f.unknowns)
3838
return EstimationStats{D, T}(f.num_obs, f.llk, f.aic, f.bic, np, estim_results)

test/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function test_GARCH_1_1(y, seed::Int, optimizer; atol = 1e-4, rtol = 1e-4)
223223
lb = [-1.0; 0.0; 0.0; 0.0]
224224
gas = Model(1, 1, Normal, 1.0, time_varying_params = [2])
225225
f = fit!(gas, y; initial_params = ini, verbose = 2, opt_method = optimizer(gas, 10; ub = ub, lb = lb))
226-
show(stdout, fit_stats(f))
226+
show(stdout, results(f))
227227

228228
@test gas.ω[1] - -0.00616637237701241 0 atol = atol rtol = rtol
229229
@test gas.ω[2] - 0.010760592759725487 0 atol = atol rtol = rtol

0 commit comments

Comments
 (0)