mc_twin: Twin Models Structure

Description Usage Arguments Value Author(s) Source See Also Examples

View source: R/mc_twin.R

Description

The function mc_twin helps to build the components of the matrix linear predictor associated with ACDE models for analysis of twin data.

Usage

1
2
3
4
5

Arguments

id

name of the column (string) containing the twin index. It should be the same index (number) for both twins.

twin.id

name of the column (string) containing the twin index inside the pair. In general 1 for the first twin and 2 for the second twin.

type

name of the column (string) containing the indication of the twin as mz or dz. It should be a factor with only two levels mz and dz. Be sure that the reference level is mz.

replicate

name of the column (string) containing the index for more than one observation taken at the same twin pair. It is used for example in twin longitudinal studies. In that case, the replication column should contain the time index.

structure

model type options are full, flex, uns, ACE, ADE, AE, CE and E. See example for details.

data

data set.

formula

internal.

Value

A list of matrices of dgCMatrix class.

Author(s)

Wagner Hugo Bonat, wbonat@ufpr.br

Source

Bonat, W. H. (2018). Multiple Response Variables Regression Models in R: The mcglm Package. Journal of Statistical Software, 84(4):1–30.

See Also

mc_id, mc_dist, mc_car, mc_rw, mc_ns, mc_dglm and mc_mixed.

Examples

1
2
id <- rep(1:5, each = 4)
id.twin <- rep(1:2, 10)

wbonat/mcglm documentation built on June 23, 2020, 11:06 a.m.