Learn R Programming

perARMA (version 1.7)

ab2phth: Fourier representation of real matrix

Description

The function ab2phth transforms an input matrix a of size \(T \times p\) containing the sine and cosine coefficients in the real Fourier series representation, to the \(T \times p\) output matrix phi according to \( \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, \ldots, T \) and \( j = 1, \ldots, p\). The inverse transformation is implemented in phth2ab function.

Usage

ab2phth(a)
phth2ab(phi)

Value

martix phi or a for ab2phth or phth2ab, respectively.

Arguments

a

matrix of \(a_{n,j}\) coefficients (size of \(T \times p\)).

phi

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

Author

Harry Hurd

See Also

makepar, makeparma, parma_ident

Examples

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

Run the code above in your browser using DataLab