ab2phth {perARMA}R Documentation

Fourier representation of real matrix

Description

The function ab2phth transforms an input matrix a of size T×pT \times p containing the sine and cosine coefficients in the real Fourier series representation, to the T×pT \times p output matrix phi according to ϕn,j=a1,j+k=1T/2(a2k,jcos(2πkn/T)+a2k+1,jsin(2πkn/T)) \phi_{n,j} = a_{1,j} + \sum_{k=1}^{\left\lfloor T/2 \right\rfloor }(a_{2k,j} \cos(2\pi kn/T) + a_{2k+1,j} \sin(2\pi kn/T)) for n=1,,T n = 1, \ldots, T and j=1,,p j = 1, \ldots, p. The inverse transformation is implemented in phth2ab function.

Usage

ab2phth(a)
phth2ab(phi)

Arguments

a

matrix of an,ja_{n,j} coefficients (size of T×pT \times p).

phi

matrix of ϕn,j\phi_{n,j} coefficients (size of T×pT \times p).

Value

martix phi or a for ab2phth or phth2ab, respectively.

Author(s)

Harry Hurd

See Also

makepar, makeparma, parma_ident

Examples

 m=matrix(seq(0,11),3,4)
 ab<-ab2phth(m)
 phi=ab$phi
 phth2ab(phi) 

[Package perARMA version 1.7 Index]