bivTwinMod: Generate lavaan syntax for a bivariate twin model. The...

Description Usage Arguments

Description

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.

Usage

1
2
3
4
5
6
bivTwinMod(
  measT1,
  measT2,
  regressions = list(list(int = 1, fem = "female"), list(int = 1, fem = "female")),
  model = list(A = "a", C = "c", E = "e")
)

Arguments

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').


deepchocolate/qglavmods documentation built on Oct. 14, 2021, 10:22 a.m.