Generate lavaan syntax for a bivariate twin model. The expected data structure is a wide format over twin pairs. When running lavaan, the option group.label should be used to indicate the value of MZ and then the DZ pair, e.g. group.label=c("MZ", "DZ"). Otherwise lavaan may mix up the twin pair correlations based on the order of entry in the data.
1 2 3 4 5 6 |
measT1 |
A list of variable name and a designated label eg label(varName1="label1", varName2="label2") for twin 1. |
measT2 |
A list of variable name and a designated label eg label(varName1="label1", varName2="label2") for twin 2. |
regressions |
A list of lists for the regressions for measT1 and measT1. |
model |
A list of variance components (A,C,D,E) and labels, eg list(A='a',C='c',E='e'). |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.