crosslag_ace_ade_old: The cross-lagged ACE model used before 2024

crosslag_ace_ade_oldR Documentation

The cross-lagged ACE model used before 2024

Description

This is the cross-lagged ACE model used before 2024. The new model which is now under the name crosslag_ace is has an improved algebra for computation of phenotypic paths and their decomposition into ACE. All other components of the model, including the core parameters, remained unchanged.

The onld model is kept for reproducibility.

Usage

cross_lag_ace_old(
  data,
  zyg = character(0),
  definition,
  data_type = "raw",
  sep = getOption("TwinAnalysis.sep")
)

cross_lag_ade_old(
  data,
  zyg = character(0),
  definition,
  data_type = "raw",
  sep = getOption("TwinAnalysis.sep")
)

Arguments

data

either data.frame (for raw data) or list for covariation/correlation input. See Note.

zyg

name of the variable that labels zygosity in the data.frame.

definition

a list that describes measurement occasions. See Note.

data_type

type of the data (raw, cov or cor). See Note.

sep

separator between the name of the phenotype and the label of a twin. Default is ”.

Value

One unfitted mxModel.

Note

The function accepts two forms of the data: data.frame (data_type = 'raw') or list of covariance/correlation matrices (data_type = 'cov', data_type = 'cor').

When data is a data.frame, zyg is expected to point at the variable in data that defines zygosity groups . Zygosity variable MUST be a factor with two labels: 'MZ' and 'DZ'.

When data is a list of covariance/correlation matrices, it must include two named elements, 'MZ' and 'DZ'. These elements must be the lists with following elements: observed (covariance/correlation matrix), means (numeric vector of observed means, optional) and numObs (number of observations).

By default, it is expected that phenotypic trait X is labeled as 'X1' in twin 1 and 'X2' in twin 2.

definition is a list of character vectors. The first character vector includes the variables from the first measurement occasion, the second - the variables from the second measurement occasion, etc. In the model, the variables from the same measurement occasion are assumed to correlate. The variables from one measurement occasion are assumed to predict the variables from the next measurement occasion. Refer to the vignette on genetic cross-lag for more information.

Output tables: "Variance components": proportion of variance explained by A/C/D/E, per variable, proportion of variance unaccounted for by preceding measurements (specific variance); "Raw variance": total variance and variance of A/C/D/E, per variable; "Raw paths": unstandardized regression and covariance paths for A/C/D/E; "Standardized paths": standardized regression and covariance paths for A/C/D/E; "Phenotypic paths": total (phenotypic) regression and covariance paths, unstandardized and standardized, and proportion of each path explained by A/C/D/E.


IvanVoronin/TwinAnalysis documentation built on July 24, 2024, 9:36 p.m.