Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cor.fts

Correlation for Functional Time Series Objects


Description

This function finds the correlation between univarite or multivariate functional time series (fts) objects.

Usage

cor.fts(Y1, Y2)

Arguments

Y1

an object of class fts

Y2

an object of class fts

Value

a scalar that is the correlation between fts objects

See Also

Examples

## Not run: 
require(fda)
require(Rfssa)
## Raw image data
NDVI=Jambi$NDVI
EVI=Jambi$EVI
## Kernel density estimation of pixel intensity
D0_NDVI <- matrix(NA,nrow = 512, ncol = 448)
D0_EVI <- matrix(NA,nrow =512, ncol = 448)
for(i in 1:448){
  D0_NDVI[,i] <- density(NDVI[,,i],from=0,to=1)$y
  D0_EVI[,i] <- density(EVI[,,i],from=0,to=1)$y
}
## Define functional objects
d <- 11
basis <- create.bspline.basis(c(0,1),d)
u <- seq(0,1,length.out = 512)
y_NDVI <- smooth.basis(u,as.matrix(D0_NDVI),basis)$fd
y_EVI <- smooth.basis(u,as.matrix(D0_EVI),basis)$fd
Y_NDVI <- fts(y_NDVI)
Y_EVI <- fts(y_EVI)
cor.fts(Y_NDVI,Y_EVI)

## End(Not run)

Rfssa

Functional Singular Spectrum Analysis

v1.0.0
GPL (>= 2)
Authors
Hossein Haghbin [aut, cre], Seyed Morteza Najibi [aut], Jordan Trinka [aut], Mehdi Maadooliat [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.