Learn R Programming

dvir (version 3.3.0)

generatePairings: Sex-consistent pairings

Description

Generate a list of sex-consistent pairings for each victim in a DVI problem. By default, the empty pairing (denoted *) is included for each victim.

Usage

generatePairings(dvi, includeEmpty = TRUE, ignoreSex = FALSE)

Value

A list of character vectors. Each vector is a subset of missing, plus the character * denoting no pairing.

Arguments

dvi

A dviData object, typically created with dviData().

includeEmpty

A logical. If TRUE (default), the do-nothing symbol (*) is included for each victim.

ignoreSex

A logical.

See Also

jointDVI()

Examples

Run this code

pm = singletons(c("V1", "V2"), sex = 1:2)
          
missing = paste0("M", 1:4)
am = list(nuclearPed(children = missing[1:3]),
          nuclearPed(children = missing[4], sex = 2))

dvi = dviData(pm, am, missing)
generatePairings(dvi)

Run the code above in your browser using DataLab