ToeplitzInverseUpdate | R Documentation |
Let G be a Toeplitz matrix of order n and with (i,j)-element, r[Abs[i-j]]. So the first row of G may be written (r[0],...,r[n-1]). Suppose the next element in the sequence is r[n]. Then the inverse of the Toeplitz matrix whose first row is (r[0],...,r[n]) may be obtained either using ToeplitzInverseUpdate or directly using TrenchInverse. ToeplitzInverseUpdate is somewhat faster.
ToeplitzInverseUpdate(GI, r, rnew)
GI |
inverse of Toeplitz matrix G of order n |
r |
first row of G , ie r[0],...,r[n-1] |
rnew |
next element, r[n] |
Although this update requires O(n^2)
flops, the same as TrenchInverse,
it is somewhat faster in practice.
inverse matrix of order n+1
A.I. McLeod
Graybill, F.A. (1983). Matrices with Applications in Statistics.
McLeod, A.I., Yu, Hao, Krougly, Zinovi L. (2007). Algorithms for Linear Time Series Analysis, Journal of Statistical Software.
TrenchInverse
#In this example we compute the update inverse directly and using ToeplitzInverseUpdate and
#compare the result.
phi<-0.8
sde<-30
n<-30
r<-arima.sim(n=30,list(ar=phi),sd=sde)
r<-phi^(0:(n-1))/(1-phi^2)*sde^2
n1<-25
G<-toeplitz(r[1:n1])
GI<-solve(G) #could also use TrenchInverse
GIupdate<-ToeplitzInverseUpdate(GI,r[1:n1],r[n1+1])
GIdirect<-solve(toeplitz(r[1:(n1+1)]))
ERR<-sum(abs(GIupdate-GIdirect))
ERR
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.