Skip to content

Commit 7c215ca

Browse files
Fix plotdiagnostics(kf)
1 parent 4940f7a commit 7c215ca

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

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.3"
4+
version = "0.6.4"
55

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

src/kalman_filter_and_smoother.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function get_standard_innovations(fo::FilterOutput)
8585
v = get_innovations(fo)
8686
F = get_innovations_variance(fo)
8787
@assert size(v, 2) == 1 # Must be univariate
88-
return v[:, 1] ./ sqrt.(F[1, 1, :])
88+
return v[:, 1] ./ sqrt.(F[:, 1, 1])
8989
end
9090

9191
function vector_of_vector_to_matrix(vov::Vector{Vector{T}}) where T

src/visualization/diagnostics.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@userplot PlotDiagnostics
22
@recipe function f(diagnostics::PlotDiagnostics)
3-
standard_residuals = get_standard_residuals(diagnostics.args)
3+
@assert typeof(diagnostics.args[1]) <: FilterOutput
4+
standard_residuals = get_standard_residuals(diagnostics.args[1])
45
@assert size(standard_residuals, 2) == 1
56
n = length(standard_residuals)
67
layout := (2, 2)

0 commit comments

Comments
 (0)