Learn R Programming

ftsa (version 6.4)

centre: Mean function, variance function, median function, trim mean function of functional data

Description

Mean function, variance function, median function, trim mean function of functional data

Usage

centre(x, type)

Value

Return mean function, variance function, median function or trim mean function.

Arguments

x

An object of class matrix.

type

Mean, variance, median or trim mean?

Author

Han Lin Shang

See Also

pcscorebootstrapdata, mean.fts, median.fts, sd.fts, var.fts

Examples

Run this code
# mean function is often removed in the functional principal component analysis.
# trimmed mean function is sometimes employed for robustness in the presence of outliers.
# In calculating trimmed mean function, several functional depth measures were employed.	
centre(x = ElNino_ERSST_region_1and2$y, type = "mean")
centre(x = ElNino_ERSST_region_1and2$y, type = "var")
centre(x = ElNino_ERSST_region_1and2$y, type = "median")
centre(x = ElNino_ERSST_region_1and2$y, type = "trimmed")

Run the code above in your browser using DataLab