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, p, missval)
ppfcoeffab(ppf, nsamp, printflg, datastr)
ppfplot(ppf, nsamp, alpha, datastr)perpacf function.ppf.perpacf returns two matrixes:ppfcoeffab returns table of values:pkab of ppf values.ppfplot returns plot of $\pi(t,n+1)$ coefficients and table of p-vaules for provided
tests.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$.peracfdata(volumes)
perpacf_out<-perpacf(t(volumes),24,12,NaN)
ppa=perpacf_out$ppa
nsamp=perpacf_out$nsamp
ppfcoeffab(ppa,nsamp,1,'volumes')
dev.set(which=1)
ppfplot(ppa,41,.05,'volumes')Run the code above in your browser using DataLab