File tree 2 files changed +10
-47
lines changed
2 files changed +10
-47
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -129,25 +129,17 @@ pacf_ls = [-1.598495044296996e-03 - 2.915104118351207e-01im
129
129
130
130
@test pacf (x1, 1 : 4 ) ≈ pacf_ls[1 : 4 ]
131
131
132
- # # pacf Yule-Walker
133
-
134
- function yulewalker_qr (v:: AbstractVector )
135
- A = toeplitz (v)
136
- b = v[2 : end ]
137
- x = - A\ b
138
- end
139
- function toeplitz (v:: AbstractVector{T} ) where T
140
- N = length (v)
141
- A = zeros (T, N - 1 , N - 1 )
142
- for n in 1 : N- 1
143
- A[n, n+ 1 : end ] = conj (v[2 : N- n])
144
- A[n, 1 : n] = reverse (v[1 : n])
145
- end
146
- return A
147
- end
148
- # durbin solver
132
+ # # PACF Durbin solver
133
+ p_qr = [ 0.007061066965510003 + 0.2467057077053922im
134
+ 0.3390065585042673 - 0.19328284216710082im
135
+ 0.17336154780689775 - 0.026816622064955047im
136
+ 0.17103798323175215 - 0.16022674917138569im
137
+ - 0.10466472359738815 - 0.1320218198465664im
138
+ 0.0486999464280363 - 0.10069213696609468im
139
+ 0.056254003938430636 - 0.09745957137815701im
140
+ - 0.07247287124498031 + 0.05734525689737796im
141
+ 0.10967412213230482 - 0.05581001671362978im ]
149
142
acf = autocor (x1)
150
- p_qr = [yulewalker_qr (acf[1 : n])[n- 1 ] for n in 2 : length (acf)]
151
143
y = similar (acf[2 : end ])
152
144
pd = similar (acf[2 : end ])
153
145
StatsBase. durbin! (acf[2 : end ], y, pd)
You can’t perform that action at this time.
0 commit comments