# NOT RUN {
N <- 200
P <- 100
grid <- seq(0, 1, length.out = P)
# Creating an exponential covariance function to simulate Gaussian data
Cov <- exp_cov_function(grid, alpha = 0.3, beta = 0.4)
# Simulating (independent) Gaussian functional data with given center and covariance function
Data_1 <- generate_gauss_fdata(
N = N,
centerline = sin(2 * pi * grid),
Cov = Cov
)
Data_2 <- generate_gauss_fdata(
N = N,
centerline = sin(2 * pi * grid),
Cov = Cov
)
# Using the simulated data as (independent) components of a bivariate functional dataset
mfD <- mfData(grid, list(Data_1, Data_2))
# }
# NOT RUN {
# Computes bootstrap estimate of Spearman correlation
cor_spearman_accuracy(mfD, ordering = "MEI")
cor_spearman_accuracy(mfD, ordering = "MHI")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab