powered by
Generates functional data for two groups with optional differences in latent means or scalar intercepts.
simulate_fmi_data( N_A = 50, N_B = 50, T_points = 51, mean_shift = 0, scalar_shift = 0, eigenvalues = c(4, 1, 0.5, 0.1), noise_sd = 0.5, seed = NULL )
A list with Y_mat, group_vec, and argvals.
Y_mat
group_vec
argvals
Sample size for Group A (default: 50).
Sample size for Group B (default: 50).
Number of time points (default: 51).
A shift added to FPC 1 scores for Group B (default: 0).
A shift added to the mean function for Group B (default: 0).
A vector of eigenvalues for FPCs (default: c(4, 1, 0.5, 0.1)).
Standard deviation of measurement error (default: 0.5).
Optional. A random seed for reproducibility.
sim_data <- simulate_fmi_data(N_A = 10, N_B = 10, T_points = 20, seed = 123) str(sim_data)
Run the code above in your browser using DataLab