elastic_change_fpca {fdasrvf}R Documentation

Elastic Changepoint Detection

Description

This function identifies changepoints using a functional PCA

Usage

elastic_change_fpca(
  f,
  time,
  pca.method = "combined",
  pc = 0.95,
  d = 1000,
  n_pcs = 5,
  smooth_data = FALSE,
  sparam = 25,
  showplot = TRUE
)

Arguments

f

matrix (N x M) of M functions with N samples

time

vector of size N describing the sample points

pca.method

string specifying pca method (options = "combined", "vert", or "horiz", default = "combined")

pc

percentage of cummulation explained variance (default = 0.95)

d

number of monte carlo iterations of Brownian Bridge (default = 1000)

n_pcs

scalar specify number of principal components (default = 5)

smooth_data

smooth data using box filter (default = F)

sparam

number of times to apply box filter (default = 25)

showplot

show results plots (default = T)

Value

Returns a list object containing

pvalue

p value

change

indice of changepoint

DataBefore

functions before changepoint

DataAfter

functions after changepoint

MeanBefore

mean function before changepoint

MeanAfter

mean function after changepoint

WarpingBefore

warping functions before changepoint

WarpingAfter

warping functions after changepoint

WarpingMeanBefore

mean warping function before changepoint

WarpingMeanAfter

mean warping function after changepoint

change_fun

amplitude change function

Sn

test statistic values

References

J. D. Tucker and D. Yarger, “Elastic Functional Changepoint Detection of Climate Impacts from Localized Sources”, Envirometrics, 10.1002/env.2826, 2023.


[Package fdasrvf version 2.3.1 Index]