center_data: Center Functional Data With Change

Description Usage Arguments Value See Also Examples

View source: R/center_data.R

Description

This function centers the functional data by subtracting the pointwise mean from each of the functions in a functional data by taking into account a potential change in the mean function. If there is a change in the mean function, the location of the change is estimated using a fully functional estimator implemented in change_FF, and the mean before and after the change is computed and subtracted from the respective part of the functional data.

Usage

1
center_data(fdobj, change = TRUE)

Arguments

fdobj

A functional data object

change

If TRUE centering is done by considering the mean change, if FALSE, the global mean function is subtracted from the functional data. The default is change=TRUE.

Value

Centered functional data sample (class fd) containing:

coefs

The coefficient array

basis

A basis object

fdnames

A list containing names for the arguments, function values and variables

See Also

center.fd

Examples

1
2
3
4
5
6
7
8
# Generate FAR(1) process with change in the mean
f_AR = fun_AR(n=100, nbasis=21, kappa=0.9)
f_AR_change = insert_change(f_AR, k=20, change_location = 0.5, SNR=5)
fdata = f_AR_change$fundata
c_fdata = center_data(fdata)
par(mfrow=c(1,2))
plot(fdata, main="Functional Data")
plot(c_fdata, main="Centered Functional Data")

SonmezOzan/fChange_0.2.0 documentation built on May 17, 2019, 8:04 a.m.