powered by
model.matrix for pedigree creates design matrix ($Z$) for individuals with and without records. Used mainly for educational purposes.
model.matrix
"model.matrix"(object, y, id, left=TRUE, names=TRUE, ...)
y
left=TRUE
left=FALSE
Pedigree
relationshipAdditive
inverseAdditive
data(Mrode3.1) (x <- Pedigree(x=Mrode3.1, subject="calf", ascendant=c("sire", "dam"), ascendantSex=c("Male", "Female"), sex="sex")) model.matrix(object=x, y=x$pwg, id=x$calf)
Run the code above in your browser using DataLab