# Basic usage with default parameters
sim_data <- data_generator_vd()
# Generate data with non-aligned domains
non_aligned_data <- data_generator_vd(N = 150, J = 120, aligned = FALSE)
# Generate multivariate functional data
multivariate_data <- data_generator_vd(N = 200, J = 100, multivariate = TRUE)
# Generate data with non-functional covariates and smooth term
complex_data <- data_generator_vd(
N = 100,
J = 150,
use_x = TRUE,
use_f = TRUE
)
# Generate data with a different beta function and R-squared value
custom_beta_data <- data_generator_vd(
N = 80,
J = 80,
beta_index = 2,
Rsq = 0.8
)
# Access components of the generated data
y <- sim_data$y # Response variable
X_s <- sim_data$X_s # Noise-free functional covariate
X_se <- sim_data$X_se # Noisy functional covariate
Run the code above in your browser using DataLab