https://github.com/cran/ltsa
Raw File
Tip revision: 72f0ab7f859a80d0028d4552ee318382108d8bac authored by A.I. McLeod on 05 January 2008, 00:00:00 UTC
version 1.1
Tip revision: 72f0ab7
ToeplitzInverseUpdate.R
`ToeplitzInverseUpdate` <-
function( GI, r, rnew )
{   
    g <- rev(c(r,rnew)[-1])
    GIg <- c(crossprod(GI,g))
    e <- 1/(r[1]-sum(g*GIg))
    f <- -GIg*e
    A <- GI + outer(GIg,GIg)*e
    rbind(cbind(A,f),c(f,e))
}

back to top