The function perpacf, given an input time series, a specified period T and a lag p, computes the periodic sample correlation coefficients π(t,n) and returns their values as a matrix ppa of size T×(p+1).
The ppfcoeffab procedure transforms the output of perpacf into Fourier form, i.e. into Fourier coeficients, so we can represent π(t,n) by its Fourier coefficients.
Function ppfplot plots perpacf coefficients returned by perpacf as function of n for each specified lag t=1,2,…,T.
ppf: matrix of periodic PACF values (of size T×(p+1)) returned by perpacf function.
nsamp: number of samples (periods) used to compute ppf.
printflg: parameter should be positive to return messages.
alpha: parameter for thresolds are displayed along with the Bonferroni corrected thresholds.
datastr: string name of data for printing.
Details
Procedure perpacf returns ppa matrix, where for each separation n=0,1,...,p, ppa[,n] is the value of π^(t,n) for t=1,2,...,T. Further, since T is assumed to be the period of the underlying PC process, π(t,n) is periodic in t with period T. So we can represent π(t,n) by its Fourier coefficients. Further, if the variation in time of π(t,n) is really smooth over the period, then looking at these Fourier coefficients (the output of ppfcoeffab) may be a more sensitive detector of linear dependence of xt+1 on the preceding n samples (think of n as fixed here) than looking at π(t,n) for individual times. The ppfcoeffab procedure also needs the sample size nsamp used by perpacf in computing the π(t,n)
in order to compute p-values for the pkab coefficients. The p-values are computed assuming that for each t, π(t,n) is N(0,1/sqrt(nsamp)) under the null. The procedure ppfcoeffab is called in parma_ident.
Function ppfplot plots values of π(t,n+1) and computes p-values for testing if π(n0+1,t)=0 for all t = 1, ..., T and fix n0 (p-values in column labelled n0=n) and if π(n+1,t)=0 for all t = 1, ..., T and n0≤n≤nmax (p-values in column labelled n0≤n≤nmax). perpacf is plotted as function of n for each specified lag t=1,2,…,T.
Returns
The function perpacf returns two matrixes: - ppa: matrix of size T×(p+1) with perpacf coefficients.
nsamp: matrix of size T×(p+1) with numbers of samples used in estimation of sample correlation.
The function ppfcoeffab returns table of values: - pihat_k: Fourier coefficients pkab of ppf values.
pv: Bonferroni corrected p-values.
The function ppfplot returns plot of π(t,n+1) coefficients and table of p-vaules for provided tests. Note that there are two plots; the first plot presents values of π(t,n+1) for all considered t and n, whereas the second plot presents separate charts for particular t values.
References
Hurd, H. L., Miamee, A. G., (2007), Periodically Correlated Random Sequences: Spectral Theory and Practice, Wiley InterScience.