FMA.concurrent function

Functional mediation analysis under concurrent regression model

Functional mediation analysis under concurrent regression model

This function performs functional mediation regression under the concurrent model with given tuning parameter.

FMA.concurrent(Z, M, Y, intercept = TRUE, basis = NULL, Ld2.basis = NULL, basis.type = c("fourier"), nbasis = 3, timeinv = c(0, 1), timegrids = NULL, lambda.m = 0.01, lambda.y = 0.01)

Arguments

  • 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.

Details

The concurrent mediation model is

M(t)=Z(t)α(t)+ϵ1(t), M(t)=Z(t)\alpha(t)+\epsilon_{1}(t), Y(t)=Z(t)γ(t)+M(t)β(t)+ϵ2(t), Y(t)=Z(t)\gamma(t)+M(t)\beta(t)+\epsilon_{2}(t),

where α(t)\alpha(t), β(t)\beta(t), γ(t)\gamma(t) are coefficient curves. The model coefficient curves are estimated by minimizing the penalized L2L_{2}-loss.

Returns

  • basis: the basis functions used in the analysis.

  • M: a list of output for the mediator model

    coefficientthe estimated coefficient with respect to the basis function

    curve: the estimated coefficient curve

    fitted: the fitted value of M

    lambda: λ\lambda value

  • Y: a list of output for the outcome model

    coefficient: the estimated coefficient with respect to the basis function

    curve: the estimated coefficient curve

    fitted: the fitted value of Y

    lambda: λ\lambda value

  • IE: a list of output for the indirect effect comparing Z1(t)=1Z_{1}(t)=1 versus Z0(t)=0Z_{0}(t)=0

    coefficients: the coefficient with respect to the basis function

    curve: the estimated causal curve

  • DE: a list of output for the direct effect comparing Z1(t)=1Z_{1}(t)=1 versus Z0(t)=0Z_{0}(t)=0

    coefficients: the coefficient with respect to the basis function

    curve: the estimated causal curve

References

Zhao et al. (2017). Functional Mediation Analysis with an Application to Functional Magnetic Resonance Imaging Data. arXiv preprint arXiv:1805.06923.

Author(s)

Yi Zhao, Johns Hopkins University, zhaoyi1026@gmail.com ;

Xi Luo, Brown University xi.rossi.luo@gmail.com ;

Martin Lindquist, Johns Hopkins University, mal2053@gmail.com ;

Brian Caffo, Johns Hopkins University, bcaffo@gmail.com

Examples

################################################## # Concurrent functional mediation model data(env.concurrent) Z<-get("Z",env.concurrent) M<-get("M",env.concurrent) Y<-get("Y",env.concurrent) # consider Fourier basis fit<-FMA.concurrent(Z,M,Y,intercept=FALSE,timeinv=c(0,300)) # estimate of alpha plot(fit$M$curve[1,],type="l",lwd=5) lines(get("alpha",env.concurrent),lty=2,lwd=2,col=2) # estimate of gamma plot(fit$Y$curve[1,],type="l",lwd=5) lines(get("gamma",env.concurrent),lty=2,lwd=2,col=2) # estimate of beta plot(fit$Y$curve[2,],type="l",lwd=5) lines(get("beta",env.concurrent),lty=2,lwd=2,col=2) # estimate of causal curves plot(fit$IE$curve,type="l",lwd=5) plot(fit$DE$curve,type="l",lwd=5) ##################################################
  • Maintainer: Yi Zhao
  • License: GPL (>= 2)
  • Last published: 2018-05-24

Useful links