LD: Levinson Durbin algorithm

Description Usage Arguments Details Value Author(s) References Examples

View source: R/LD.R

Description

Levinson Dubin Algorithm, following Brockwell & Davis 1987, to compute phi_k's and arrange in phi.mat Also computes phi_kk's and tau's needed for likelihood.

Usage

1
LD(r, n-1)

Arguments

r

a vector of autocovariances

n

a numeric to specify the length of vector taus/dimension of matrix phi_kks

Details

See Brockwell and Davis

Value

phi.mat

A n x n matrix of phi_kk's

s

a vector of tau's, of length n

Author(s)

Hannah Lennon

References

Brockwell and Davis (1987)

Examples

1
2
3
4
5
6
7
8
r      <- as.numeric(ARMAacf(ar=0.7, ma=-0.5, lag.max=10, pacf=FALSE))   
n      <- 5 
output <- LD(r, n-1)

PHI    <- t(output[, 1:n])    # matrix of n x n 
tau    <- output[,(n+1)]      # vector of n
PHI; tau
            

hlennon/copulaIVTS documentation built on Dec. 20, 2021, 4:45 p.m.