Skip to content

Commit 5f28e4f

Browse files
committed
Change initial values spatial dependence
1 parent c3b660b commit 5f28e4f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/fit/utilities.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,14 @@ function init!(ε::SpatialAutoregression, method::Symbol)
178178
if method == :data
179179
# estimate spatial filter
180180
if length(spatial(ε)) == 1
181-
ρ = dot(weights(ε) * resid(ε), resid(ε)) / sum(abs2, weights(ε) * resid(ε))
182-
spatial(ε) .= max(-0.99 * ε.ρ_max, min(0.99 * ε.ρ_max, ρ))
181+
# ρ = dot(weights(ε) * resid(ε), resid(ε)) / sum(abs2, weights(ε) * resid(ε))
182+
# spatial(ε) .= max(-0.99 * ε.ρ_max, min(0.99 * ε.ρ_max, ρ))
183+
spatial(ε) .= 0.0
183184
else
184185
for i eachindex(spatial(ε))
185-
ρi = dot(weights(ε)[i,:]' * resid(ε), resid(ε)[i,:]) / sum(abs2, weights(ε)[i,:]' * resid(ε))
186-
spatial(ε)[i] = max(-0.99 * ε.ρ_max, min(0.99 * ε.ρ_max, ρi))
186+
# ρi = dot(weights(ε)[i,:]' * resid(ε), resid(ε)[i,:]) / sum(abs2, weights(ε)[i,:]' * resid(ε))
187+
# spatial(ε)[i] = max(-0.99 * ε.ρ_max, min(0.99 * ε.ρ_max, ρi))
188+
spatial(ε)[i] = 0.0
187189
end
188190
end
189191

0 commit comments

Comments
 (0)