getMED.loadings function

Get Factor Loadings for a Longitudinal Mediation Model with Specified Functional Curves

Get Factor Loadings for a Longitudinal Mediation Model with Specified Functional Curves

This function specifies the factor loadings for a longitudinal mediation model with given functional form.

getMED.loadings( t_var, y_var, m_var, x_type, x_var, curveFun, y_records, m_records, x_records = NULL )

Arguments

  • t_var: A vector of strings, with each element representing the prefix for column names related to the time variable for the corresponding longitudinal variable at each study wave. It takes the value passed from getMediation().

  • y_var: A string specifying the prefix of the column names corresponding to the outcome variable at each study wave. It takes the value passed from getMediation().

  • m_var: A string specifying the prefix of the column names corresponding to the mediator variable at each study wave. It takes the value passed from getMediation().

  • x_type: A string indicating the type of predictor variable used in the model. Supported values are "baseline"

    and "longitudinal". It takes the value passed from getMediation().

  • x_var: A string specifying the baseline predictor if x_type = "baseline", or the prefix of the column names corresponding to the predictor variable at each study wave if x_type = "longitudinal". It takes the value passed from getMediation().

  • curveFun: A string specifying the functional form of the growth curve. Supported options include: "linear"

    (or "LIN"), and "bilinear spline" (or "BLS"). It takes the value passed from getMediation().

  • y_records: A numeric vector specifying indices of the study waves for the outcome variable. It is the first vector in records specified in getMediation().

  • m_records: A numeric vector specifying indices of the study waves for the mediator variable. It is the second vector in records specified in getMediation().

  • x_records: A numeric vector specifying indices of the study waves for the predictor variable. Default value is NULL, which is for x_type = "baseline". If x_type = "longitudinal", it is the third vector in records specified in getMediation().

Returns

A list containing the specification of definition variables (i.e., individual measurement occasions) and factor loadings of a longitudinal mediation model.

  • Maintainer: Jin Liu
  • License: GPL (>= 3.0)
  • Last published: 2023-09-12