crosslag_ace_ade: Cross-laged ACE model

crosslag_ace_adeR Documentation

Cross-laged ACE model

Description

A cross-lagged ACE model is used to decompose phenotypic cross-lagged relationships into ACE. This is the improved version of the model where the algebra that computes phenotypic paths and their decomposition into ACE was improved. ll other components of the model, including core parameters, remained unchanged. The original model is kept as crosslag_ace_old.

Usage

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

cross_lag_ade(
  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.