Newly tracked file
src/univariatearchmodel.jl
changed.
Showing 1 of 1 files from the diff.
@@ -558,42 +558,6 @@
Loading
558 | 558 | return fit(VS{res[ind].subset...}, data; dist=dist, meanspec=res[ind].meanspec, algorithm=algorithm, autodiff=autodiff, kwargs...) |
|
559 | 559 | end |
|
560 | 560 | ||
561 | - | function selectmodel_old(::Type{VS}, data::Vector{T}; |
|
562 | - | dist::Type{SD}=StdNormal{T}, meanspec::Union{MS, Type{MS}}=Intercept{T}, |
|
563 | - | maxlags::Integer=3, minlags::Integer=1, criterion=bic, show_trace=false, algorithm=BFGS(), |
|
564 | - | autodiff=:forward, kwargs... |
|
565 | - | ) where {VS<:UnivariateVolatilitySpec, T<:AbstractFloat, |
|
566 | - | SD<:StandardizedDistribution, MS<:MeanSpec |
|
567 | - | } |
|
568 | - | @assert maxlags >= minlags >= 0 |
|
569 | - | ||
570 | - | #threading sometimes segfaults in tests locally. possibly https://github.com/JuliaLang/julia/issues/29934 |
|
571 | - | mylock=Threads.ReentrantLock() |
|
572 | - | ndims = max(my_unwrap_unionall(VS)-1, 0) # e.g., two (p and q) for GARCH{p, q, T} |
|
573 | - | ndims2 = max(my_unwrap_unionall(MS)-1, 0 )# e.g., two (p and q) for ARMA{p, q, T} |
|
574 | - | res = Array{UnivariateARCHModel, ndims+ndims2}(undef, ntuple(i->maxlags - minlags + 1, ndims+ndims2)) |
|
575 | - | for ind in collect(CartesianIndices(size(res))) |
|
576 | - | VSi = VS{ind.I[1:ndims] .+ minlags .-1...} |
|
577 | - | MSi = (ndims2==0 ? meanspec : meanspec{ind.I[ndims+1:end] .+ minlags .- 1...}) |
|
578 | - | res[ind] = fit(VSi, data; dist=dist, meanspec=MSi, |
|
579 | - | algorithm=algorithm, autodiff=autodiff, kwargs...) |
|
580 | - | if show_trace |
|
581 | - | lock(mylock) |
|
582 | - | Core.print(modname(VSi)) |
|
583 | - | ndims2>0 && Core.print("-", modname(MSi)) |
|
584 | - | Core.println(" model has ", |
|
585 | - | uppercase(split("$criterion", ".")[end]), " ", |
|
586 | - | criterion(res[ind]), "." |
|
587 | - | ) |
|
588 | - | unlock(mylock) |
|
589 | - | end |
|
590 | - | end |
|
591 | - | crits = criterion.(res) |
|
592 | - | _, ind = findmin(crits) |
|
593 | - | return res[ind] |
|
594 | - | end |
|
595 | - | ||
596 | - | ||
597 | 561 | function coeftable(am::UnivariateARCHModel) |
|
598 | 562 | cc = coef(am) |
|
599 | 563 | se = stderror(am) |
Files | Coverage |
---|---|
src | 99.41% |
Project Totals (12 files) | 99.41% |
570.4
570.6
569.1
569.2
569.3
569.5
570.1
569.4
570.2
570.5
570.3
569.6
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.