getTVC.info: Get the Time-Varying Covariate (TVC) Information for a...

View source: R/TVC.info_helper.R

getTVC.infoR Documentation

Get the Time-Varying Covariate (TVC) Information for a One-group Longitudinal Model with Time-varying Covariate

Description

This function constructs the OpenMx model paths and parameters for a TVC and its relationship with the parameters related to growth factors of a longitudinal outcome.

Usage

getTVC.info(y_var, records, growth_TIC, TVC, decompose, starts)

Arguments

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 getTVCmodel().

records

A numeric vector specifying the indices of the observed study waves. It takes the value passed from getTVCmodel().

growth_TIC

A string or character vector specifying the column name(s) of time-invariant covariate(s) that account for the variability of growth factors, if any. Default is NULL, indicating no growth TICs present in the model. It takes the value passed from getTVCmodel().

TVC

A string specifying the prefix of the column names corresponding to the time-varying covariate at each study wave. It takes the value passed from getTVCmodel().

decompose

An integer specifying the decomposition option for temporal states. Supported values include 0 (no decomposition), 1 (decomposition with interval-specific slopes as temporal states), 2 (decomposition with interval- specific changes as temporal states), and 3 (decomposition with change-from-baseline as temporal states). It takes the value passed from getTVCmodel().

starts

A list of initial values for the parameters, either takes the value passed from getTVCmodel() or derived by the helper function getTVC.initial().

Value

A list containing two elements: X_PARAM and KAPPA. X_PARAM is a list of OpenMx paths and parameters for the TVC, and KAPPA is an OpenMx path for the temporal effect of the TVC on the corresponding longitudinal outcome.


nlpsem documentation built on Sept. 13, 2023, 1:06 a.m.