perpacf {perARMA} | R Documentation |
Periodic PACF function
Description
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
.
Usage
perpacf(x, T_t, p, missval)
ppfcoeffab(ppf, nsamp, printflg, datastr)
ppfplot(ppf, nsamp, alpha, datastr)
Arguments
x |
input time series. |
T_t |
period of PC-T structure. |
p |
maximum lag used in computation. |
missval |
notation for missing values. |
ppf |
matrix of periodic PACF values (of size |
nsamp |
number of samples (periods) used to compute |
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 \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
.
Value
The function perpacf
returns two matrixes:
ppa |
matrix of size |
nsamp |
matrix of size |
The function ppfcoeffab
returns table of values:
pihat_k |
Fourier coefficients |
pv |
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.
Author(s)
Harry Hurd
References
Hurd, H. L., Miamee, A. G., (2007), Periodically Correlated Random Sequences: Spectral Theory and Practice, Wiley InterScience.
See Also
Examples
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')