lampspuc / scoredrivenmodels.jl Goto Github PK
View Code? Open in Web Editor NEWScore-driven models, aka generalized autoregressive score models, in Julia
Home Page: https://lampspuc.github.io/ScoreDrivenModels.jl/latest/
License: MIT License
Score-driven models, aka generalized autoregressive score models, in Julia
Home Page: https://lampspuc.github.io/ScoreDrivenModels.jl/latest/
License: MIT License
Links should be parameters
I stumbled upon this site and thought it may be good for you to add this package to the list. Just a thought.
http://www.gasmodel.com/code.htm
P.S. Nice talk at JuliaCon 2020.
x_m
, should be better investigatedAdd simulation function with the number of simulations as a parameter
Change the AuxiliaryLinAlg{T} inner data structures to StaticArrays.
There's a lot of redundancy in Fitted
and EstimationStats
, so I question the need of both types. I think we could just have EstimationStats
within Fitted
.
The GAS_Sarima
struct should be something like this, it does not require to store the distribution inside.
mutable struct GAS_Sarima{D <: Distribution, T <: AbstractFloat} <: SDM
ฯ::Vector{T}
A::Dict{Int, Matrix{T}}
B::Dict{Int, Matrix{T}}
scaling::T
end
The constructor should be somthing like GAS_Sarima{LogNormal}(....)
or GAS_Sarima(LogNormal, ....)
that turns into a GAS_Sarima{LogNormal}(....)
.
@raphaelsaavedra What do you think about letting some constants with some example time series as ARCHModels.jl does? https://github.com/s-broda/ARCHModels.jl/blob/7231d5af4a6ace2bd4c71b14768745f8231bfadd/src/univariatearchmodel.jl
function update_aux_estimation!(aux_est::AuxEstimation{T}, func::Optim.TwiceDifferentiable,
opt_result::Optim.OptimizationResults) where T
push!(aux_est.loglikelihood, -opt_result.minimum)
push!(aux_est.psi, opt_result.minimizer)
push!(aux_est.numerical_hessian, Optim.hessian!(func, opt_result.minimizer))
push!(aux_est.opt_result, opt_result)
return
end
should be
function update_aux_estimation!(aux_est::AuxEstimation{T}, func::Optim.TwiceDifferentiable,
opt_result::Optim.OptimizationResults) where T
push!(aux_est.numerical_hessian, Optim.hessian!(func, opt_result.minimizer))
push!(aux_est.opt_result, opt_result)
push!(aux_est.loglikelihood, -opt_result.minimum)
push!(aux_est.psi, opt_result.minimizer)
return
end
This can lead to major speedups in the estimation process.
We should benchmark some of the most used functions like score_tilde!
, fisher_information
and the score_driven_recursion
.
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
julia> fit_stats(f)
--------------------------------------------------------
Distribution: LogNormal
Number of observations: 400
Number of unknown parameters: 10
Log-likelihood: -779.7883
AIC: 1579.5766
BIC: 1619.4912
--------------------------------------------------------
Parameter Estimate Std.Error t stat p-value
omega_1 0.0135 0.0285 0.4750 0.6450
omega_2 -2.8408 0.0721 -39.4195 0.0000
A_1_11 -0.0378 0.0056 -6.8093 0.0000
A_2_11 0.0047 0.0034 1.4046 0.1904
A_11_11 -0.0178 0.0046 -3.8592 0.0032
A_12_11 0.0576 0.0052 11.0151 0.0000
B_1_11 -0.4784 0.0511 -9.3544 0.0000
B_2_11 0.4682 0.0496 9.4378 0.0000
B_11_11 -0.3055 0.1092 -2.7990 0.0188
B_12_11 1.3088 0.1148 11.3993 0.0000
--------------------------------------------------------
Distribution: LogNormal
Number of observations: 400
Number of unknown parameters: 10
Log-likelihood: -779.7883
AIC: 1579.5766
BIC: 1619.4912
--------------------------------------------------------
Parameter Estimate Std.Error t stat p-value
omega_1 0.0135 0.0285 0.4750 0.6450
omega_2 -2.8408 0.0721 -39.4195 0.0000
A_1_11 -0.0378 0.0056 -6.8093 0.0000
A_2_11 0.0047 0.0034 1.4046 0.1904
A_11_11 -0.0178 0.0046 -3.8592 0.0032
A_12_11 0.0576 0.0052 11.0151 0.0000
B_1_11 -0.4784 0.0511 -9.3544 0.0000
B_2_11 0.4682 0.0496 9.4378 0.0000
B_11_11 -0.3055 0.1092 -2.7990 0.0188
B_12_11 1.3088 0.1148 11.3993 0.0000
Make a table in documents showing distributions and available scalings
Right now the logit link is documented as \\tilde{f} = -\\ln(\\frac{b - a}{f + a} - 1)
but it is programmed as \\tilde{f} = \\ln(\\frac{f - a}{b - f})
. This documentation should be fixed.
We must separate the time series in the number of lags and make an unconditional estimation using the function fit(D, x)
from distributions.
I really don't like how in this line
println("initial point $i of $n_initial_points - Log-likelihood: $(-opt_result.minimum)")
it might look like the log-likelihood is associated with the initial point $i. Rather, it should be clear that it is associated with the (supposed) optimal point converged after starting in initial point $i.
A few possible rewordings would be
"Round $i of $n_initial_points"
"Iteration $i of $n_initial_points"
Etc.
There are still no tests for forecasting and simulation
time_varying_params
should choose between "location"
and "scale"
instead of 1
and 2
For example, functions in https://github.com/LAMPSPUC/ScoreDrivenModels.jl/blob/master/src/initial_params.jl
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.