getUNI.initial function

Compute Initial Values for Parameters of Latent Growth Curve Models or Latent Change Score Models with Time-invariant Covariates (If Any)

Compute Initial Values for Parameters of Latent Growth Curve Models or Latent Change Score Models with Time-invariant Covariates (If Any)

This function computes the initial values of the parameters for a latent growth curve model or a latent change score model with time-invariant covariates (if any).

getUNI.initial(dat, t_var, y_var, curveFun, records, growth_TIC, res_scale)

Arguments

  • dat: A wide-format data frame, with each row corresponding to a unique ID. It contains the observed variables with repeated measurements and occasions, and time-invariant covariates (TICs) if any. It takes the value passed from getLGCM()

    or getLCSM().

  • t_var: A string specifying the prefix of the column names corresponding to the time variable at each study wave. It takes the value passed from getLGCM() or getLCSM().

  • 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 getLGCM() or getLCSM().

  • curveFun: A string specifying the functional form of the growth curve. Supported options for latent growth curve models include: "linear" (or "LIN"), "quadratic" (or "QUAD"), "negative exponential"

    (or "EXP"), "Jenss-Bayley" (or "JB"), and "bilinear spline" (or "BLS"). Supported options for latent change score models include: "quadratic" (or "QUAD"), "negative exponential" (or "EXP"), "Jenss-Bayley" (or "JB"), and "nonparametric" (or "NonP"). It takes the value passed from getLGCM()

    or getLCSM().

  • records: A numeric vector specifying indices of the study waves. It takes the value passed from getLGCM() or getLCSM().

  • growth_TIC: A string or character vector specifying the column name(s) of time-invariant covariate(s) contributing to the variability of growth factors if any. It takes the value passed from getLGCM() or getLCSM().

  • res_scale: A numeric value representing the scaling factor for the initial calculation of the residual variance. This value should be between 0 and 1, exclusive. It takes the value passed from getLGCM() or getLCSM().

Returns

A list containing the initial values for parameters related to growth factors, TICs (if any), and path coefficients (if any) of a latent growth curve model or a latent change score model. The returned list has the following structure:

  • Y_starts:: A list containing three elements:

     - **alpha0 or mean0:**: Depends on whether `growth_TIC` is provided,
     - **psi_r or psi0:**: Depends on whether `growth_TIC` is provided,
     - **residuals.**:
    
  • TIC_starts:: Only provided when growth_TIC is not NULL.

  • beta0:: Only provided when growth_TIC is not NULL.

Each of these elements is a numeric vector or matrix containing the initial parameter estimates.

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