The function perpacf, given an input time series, a specified period T and a lag p, computes
the periodic sample correlation coefficients \(\pi(t,n)\) and returns their values as a matrix ppa of size \( T \times (p+1)\).
The ppfcoeffab procedure transforms the output of perpacf into Fourier form, i.e. into Fourier coeficients,
so we can represent \(\pi(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,\ldots, T\).
perpacf(x, T_t, p, missval)
ppfcoeffab(ppf, nsamp, printflg, datastr)
ppfplot(ppf, nsamp, alpha, datastr)The function perpacf returns two matrixes:
matrix of size \( T \times (p+1)\) with perpacf coefficients.
matrix of size \( T \times (p+1)\) with numbers of samples used in estimation of sample correlation.
The function ppfcoeffab returns table of values:
Fourier coefficients pkab of ppf values.
Bonferroni corrected p-values.
The function ppfplot returns plot of \(\pi(t,n+1)\) coefficients and table of p-vaules for provided
tests. Note that there are two plots; the first plot presents values of \(\pi(t,n+1)\) for all considered \(t\) and \(n\), whereas
the second plot presents separate charts for particular \(t\) values.
input time series.
period of PC-T structure.
maximum lag used in computation.
notation for missing values.
matrix of periodic PACF values (of size \(T \times (p+1)\)) returned by perpacf function.
number of samples (periods) used to compute ppf.
parameter should be positive to return messages.
parameter for thresolds are displayed along with the Bonferroni corrected thresholds.
string name of data for printing.
Harry Hurd
Procedure perpacf returns ppa matrix, where for
each separation n=0,1,...,p, ppa[,n] is the value
of \(\hat{\pi}(t,n)\) for t=1,2,...,T. Further, since T is assumed to be the period of the underlying PC process,
\(\pi(t,n)\) is periodic in t with period T. So we can represent \(\pi(t,n)\) by its Fourier coefficients.
Further, if the variation in time of \(\pi(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 \(x_{t+1}\) on the preceding n samples
(think of n as fixed here) than looking at \(\pi(t,n)\) for individual times.
The ppfcoeffab procedure also needs the sample size nsamp used by perpacf in computing the \(\pi(t,n)\)
in order to compute p-values for the pkab coefficients. The
p-values are computed assuming that for each t, \(\pi(t,n)\) is N(0,1/sqrt(nsamp)) under the null.
The procedure ppfcoeffab is called in parma_ident.
Function ppfplot plots values of \(\pi(t,n+1)\) and computes p-values for testing
if \( \pi(n_0+1,t)=0\) for all t = 1, ..., T and fix \(n_0\) (p-values in column labelled \(n_0=n\)) and
if \( \pi(n+1,t)=0\) for all t = 1, ..., T and \( n_0 \leq n \leq nmax\) (p-values in column labelled \( n_0 \leq n \leq nmax\)).
perpacf is plotted as function of n for each specified lag \(t=1, 2,\ldots, T\).
Hurd, H. L., Miamee, A. G., (2007), Periodically Correlated Random Sequences: Spectral Theory and Practice, Wiley InterScience.
peracf
data(volumes)
perpacf_out<-perpacf(t(volumes),24,12,NaN)
ppa=perpacf_out$ppa
nsamp=perpacf_out$nsamp
ppfcoeffab(ppa,nsamp,1,'volumes')
ppfplot(ppa,41,.05,'volumes')
Run the code above in your browser using DataLab