Skip to content

Commit 60a601c

Browse files
Fix Basic Structural Model with Explanatory
1 parent 8f08ab0 commit 60a601c

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
- version: '1'
1616
os: ubuntu-latest
1717
arch: x64
18-
- version: '1.0'
18+
- version: '1.6'
1919
os: ubuntu-latest
2020
arch: x64
21-
- version: '1.0'
21+
- version: '1.6'
2222
os: ubuntu-latest
2323
arch: x86
2424
steps:

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "StateSpaceModels"
22
uuid = "99342f36-827c-5390-97c9-d7f9ee765c78"
33
authors = ["raphaelsaavedra <[email protected]>, guilhermebodin <[email protected]>, mariohsouto"]
4-
version = "0.6.1"
4+
version = "0.6.2"
55

66
[deps]
77
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"

src/fit.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ function fit!(
6060
"If you are interested in estimates of the distribution of ther hyperparameters we advise you to" *
6161
"change the optimization algorithm by using the kwarg fit(...; optimizer = "*
6262
"Optimizer(StateSpaceModels.Optim.THE_METHOD_OF_YOUR_CHOICE()))" *
63-
"The list of possible algorithms can be found on this link https://julianlsolvers.github.io/Optim.jl/stable/#" *
64-
"Otherwise you can simply skip this proccess by using fit(...; save_hyperparameter_distribution=false) "
63+
"The list of possible algorithms can be found on this link https://julianlsolvers.github.io/Optim.jl/stable/# " *
64+
"otherwise you can simply skip this proccess by using fit(...; save_hyperparameter_distribution=false) "
6565
)
6666
std_err = fill(NaN, number_hyperparameters(model))
6767
fill_results!(model, opt_loglikelihood, std_err)

src/models/basicstructural_explanatory.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ mutable struct BasicStructuralExplanatory <: StateSpaceModel
4242
1 1 zeros(Fl, 1, s - 1) zeros(Fl, 1, num_exogenous)
4343
0 1 zeros(Fl, 1, s - 1) zeros(Fl, 1, num_exogenous)
4444
0 0 -ones(Fl, 1, s - 1) zeros(Fl, 1, num_exogenous)
45-
zeros(Fl, s - 2, 2) Matrix{Fl}(I, s - 2, s - 2) zeros(Fl, s - 2) zeros(Fl, 10, num_exogenous)
46-
zeros(Fl, num_exogenous, 13) Matrix{Fl}(I, num_exogenous, num_exogenous)
45+
zeros(Fl, s - 2, 2) Matrix{Fl}(I, s - 2, s - 2) zeros(Fl, s - 2) zeros(Fl, s - 2, num_exogenous)
46+
zeros(Fl, num_exogenous, s + 1) Matrix{Fl}(I, num_exogenous, num_exogenous)
4747
] for _ in 1:num_observations]
4848
R = [[
4949
Matrix{Fl}(I, 3, 3)

test/models/basicstructural_explanatory.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
y = CSV.File(StateSpaceModels.AIR_PASSENGERS) |> DataFrame
44
logap = log.(y.passengers)
55
X = rand(length(logap), 2)
6+
model = BasicStructuralExplanatory(logap, 10, X)
7+
fit!(model)
8+
model.results
69
model = BasicStructuralExplanatory(logap, 12, X)
710
fit!(model)
811
model.results

0 commit comments

Comments
 (0)