|
43 | 43 |
|
44 | 44 | default_autolags(lx::Int) = 0 : default_laglen(lx)
|
45 | 45 |
|
46 |
| -_autodot(x::AbstractVector{<:RealFP}, lx::Int, l::Int) = dot(x, 1:(lx-l), x, (1+l):lx) |
| 46 | +_autodot(x::AbstractVector{<:Union{Float32, Float64}}, lx::Int, l::Int) = dot(x, 1:(lx-l), x, (1+l):lx) |
47 | 47 | _autodot(x::AbstractVector, lx::Int, l::Int) = dot(view(x, 1:(lx-l)), view(x, (1+l):lx))
|
48 | 48 |
|
49 | 49 |
|
@@ -213,7 +213,7 @@ autocor(x::AbstractVecOrMat; demean::Bool=true) =
|
213 | 213 |
|
214 | 214 | default_crosslags(lx::Int) = (l=default_laglen(lx); -l:l)
|
215 | 215 |
|
216 |
| -function _crossdot(x::AbstractVector{T}, y::AbstractVector{T}, lx::Int, l::Int) where {T<:RealFP} |
| 216 | +function _crossdot(x::AbstractVector, y::AbstractVector, lx::Int, l::Int) |
217 | 217 | if l >= 0
|
218 | 218 | dot(x, 1:(lx-l), y, (1+l):lx)
|
219 | 219 | else
|
@@ -302,7 +302,7 @@ function crosscov!(r::AbstractMatrix, x::AbstractVector, y::AbstractMatrix, lags
|
302 | 302 | return r
|
303 | 303 | end
|
304 | 304 |
|
305 |
| -function crosscov!(r::AbstractArray{<:Any}, x::AbstractMatrix, y::AbstractMatrix, lags::AbstractVector{<:Integer}; demean::Bool=true) |
| 305 | +function crosscov!(r::AbstractArray{<:Any,3}, x::AbstractMatrix, y::AbstractMatrix, lags::AbstractVector{<:Integer}; demean::Bool=true) |
306 | 306 | lx = size(x, 1)
|
307 | 307 | nx = size(x, 2)
|
308 | 308 | ny = size(y, 2)
|
@@ -458,7 +458,7 @@ function crosscor!(r::AbstractMatrix, x::AbstractVector, y::AbstractMatrix, lags
|
458 | 458 | return r
|
459 | 459 | end
|
460 | 460 |
|
461 |
| -function crosscor!(r::AbstractArray{<:Any}, x::AbstractMatrix, y::AbstractMatrix, lags::AbstractVector{<:Integer}; demean::Bool=true) |
| 461 | +function crosscor!(r::AbstractArray{<:Any,3}, x::AbstractMatrix, y::AbstractMatrix, lags::AbstractVector{<:Integer}; demean::Bool=true) |
462 | 462 | lx = size(x, 1)
|
463 | 463 | nx = size(x, 2)
|
464 | 464 | ny = size(y, 2)
|
@@ -561,7 +561,7 @@ function pacf_regress!(r::AbstractMatrix, X::AbstractMatrix, lags::AbstractVecto
|
561 | 561 | for i = 1 : length(lags)
|
562 | 562 | l = lags[i]
|
563 | 563 | sX = view(tmpX, 1+l:lx, 1:l+1)
|
564 |
| - r[i,j] = l == 0 ? 1 : (cholesky!(sX'sX, Val(false)) \ (sX'view(X, 1+l:lx, j)))[end] |
| 564 | + r[i,j] = l == 0 ? 1 : (cholesky!(sX'sX, NoPivot()) \ (sX'view(X, 1+l:lx, j)))[end] |
565 | 565 | end
|
566 | 566 | end
|
567 | 567 | r
|
|
0 commit comments