Skip to content

Commit

Permalink
moving linear regression band bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
dysonance committed Apr 6, 2021
1 parent 111e8c6 commit 30c038d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/reg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ mlr_ub(y::Array{T}; n::Int64=10, se::T=2.0)::Array{Float64} where {T<:Real}
Moving linear regression upper bound
"""
function mlr_ub(y::Array{T}; n::Int64=10, se::T=2.0)::Array{Float64} where {T<:Real}
return y + se*mlr_se(y, n=n)
return mlr(y, n=n) + se*mlr_se(y, n=n)
end

"""
Expand All @@ -122,7 +122,7 @@ mlr_lb(y::Array{T}; n::Int64=10, se::T=2.0)::Array{Float64} where {T<:Real}
Moving linear regression lower bound
"""
function mlr_lb(y::Array{T}; n::Int64=10, se::T=2.0)::Array{Float64} where {T<:Real}
return y - se*mlr_se(y, n=n)
return mlr(y, n=n) - se*mlr_se(y, n=n)
end

"""
Expand Down

0 comments on commit 30c038d

Please sign in to comment.