crosslag_ace_ade | R Documentation |
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
.
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")
)
data |
either |
zyg |
name of the variable that labels zygosity in the
|
definition |
a |
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 ”. |
One unfitted mxModel
.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.