Learn R Programming

pcdpca

Implementation of "Dynamic principal components of periodically correlated functional time series".

Two examples in demo directory:

  • pm10 data from Graz (comparizon with DFPCA paper)
  • simplation with parametrized periodicity

Installation

library("devtools")
install_github("kidzik/pcdpca")

Running a demo

library("pcdpca")
demo("simulation")
demo("pcdpca.pm10")

Usage

Let X be a multivariate time series, a matrix with n observations and d covariates, periodic with period = 2. Then

FF = pcdpca(X, period=2)  # finds the optimal filter
Yhat = pcdpca.scores(X, FF)  # applies the filter
Yhat[,-1] = 0 # forces the use of only one component
Xhat = pcdpca.inverse(Yhat, FF)  # deconvolution
cat(sum((X-Xhat)^2) / sum(X^2)) # variance explained

Copy Link

Version

Install

install.packages('pcdpca')

Monthly Downloads

32

Version

0.4

License

GPL-3

Maintainer

Lukasz Kidzinski

Last Published

September 3rd, 2017

Functions in pcdpca (0.4)

pcdpca

Compute periodically correlacted DPCA filter coefficients
pcdpca.inverse

Retrieve a process from given scores
pcdpca.scores

Compute periodically correlated DPCA scores, given the filters XI