Skip to contents

A function to generate randomly simulated data for multivariate functional principal component analysis

Usage

simMFPCA(
  seed,
  t,
  n,
  components,
  mean_funs,
  eigen_funs_list,
  lambdas,
  response = FALSE,
  B = NULL
)

Arguments

seed

A seed for random number generation

t

A vector of time points

n

Number of subjects

components

Number of principal components

mean_funs

A list of functions to generate mean functions for each variable

eigen_funs_list

A list of lists of functions to generate eigenfunctions for each variable

lambdas

A vector of magnitudes of eigenvalues

response

A logical indicating whether the data is a response or a covariate

B

A matrix of regression coefficients for the response data

Value

A list of simulated data