univ_multiv_ace_ade | R Documentation |
The functions define univariate and multivariate (correlated factors) ACE and ADE models.
univariate_ace(
data,
zyg = character(0),
ph,
data_type = "raw",
sep = getOption("TwinAnalysis.sep")
)
univariate_ade(
data,
zyg = character(0),
ph,
data_type = "raw",
sep = getOption("TwinAnalysis.sep")
)
multivariate_ace(
data,
zyg = character(0),
ph,
data_type = "raw",
sep = getOption("TwinAnalysis.sep")
)
multivariate_ade(
data,
zyg = character(0),
ph,
data_type = "raw",
sep = getOption("TwinAnalysis.sep")
)
data |
either |
zyg |
name of the variable that labels zygosity in the
|
ph |
name of the phenotype, a single character value for univariate ACE/ADE or a character vector for multivariate ACE/ADE. |
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 "" (empty string). |
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.
Output tables (univariate ACE/ADE): "Variance components": proportion of total variance explained by A/C/D/E; "Raw variance": total variance, variance of A/C/D/E.
Output tables (multivariate ACE/ADE): "Variance components": proportion of
total variance explained by A/C/D/E, per phenotype; "Covariation
components": total covariance, covariance of A/C/D/E, proportion of
covariation explained by A/C/D/E; "All correlations": correlations
for A/C/D/E and total (phenotypic) correlation; "A/C/D/E/Total
correlations": correlation table for A/C/D/E or phenotypic correlation
(not returned by get_output_tables
).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.