Z: a data matrix. Z is the treatment trajectory in the mediation analysis. The number of rows is the number of subjects, and the number of columns is the number of measured time points.
M: a data matrix. M is the mediator trajectory in the mediation analysis. The number of rows is the number of subjects, and the number of columns is the number of measured time points.
Y: a data matrix. Y is the outcome trajectory in the mediation analysis. The number of rows is the number of subjects, and the number of columns is the number of measured time points.
intercept: a logic variable. Default is TRUE, an intercept term is included in the regression model.
basis: a data matrix. Basis function used in the functional data analysis. The number of columns is the number of basis function considered. If basis = NULL, Fourier basis functions will be generated.
Ld2.basis: a data matrix. The second derivative of the basis function. The number of columns is the number of basis function considered. If Ld2.basis = NULL, the second derivative of Fourier basis functions will be generated.
basis.type: a character of basis function type. Default is Fourier basis (basis.type = "fourier").
nbasis: an integer, the number of basis function included. If basis is provided, this argument will be ignored.
timeinv: a numeric vector of length two, the time interval considered in the analysis. Default is (0,1).
timegrids: a numeric vector of time grids of measurement. If timegrids = NULL, it is assumed the between measurement time interval is constant.
lambda.m: a numeric value of the tuning parameter in the mediator model.
lambda.y: a numeric value of the tuning parameter in the outcome model.