Description Usage Arguments Value Author(s) See Also Examples
model.matrix for pedigree creates design matrix (Z) for
individuals with and without records. Used mainly for educational
purposes.
1 2 3  | ## S3 method for class 'Pedigree'
model.matrix(object, y, id, left=TRUE, names=TRUE,
                                ...)
 | 
object | 
 Pedigree  | 
names | 
 logical, should returned matrix have row/colnames; this can be used to get leaner matrix  | 
y | 
 numeric, vector of (phenotypic) records  | 
id | 
 vector of subjects for   | 
left | 
 logical, bind columns of individuals without records to
left (  | 
... | 
 arguments passed to   | 
A model matrix of n * q dimension, where n is number
of records in y and q is number of subjects in the
pedigree
Gregor Gorjanc
Pedigree, relationshipAdditive,
inverseAdditive and model.matrix
1 2 3 4  | 
Loading required package: MASS
Attaching package: 'GeneticsPed'
The following object is masked from 'package:stats':
    family
  calf    sex sire  dam pwg
1   S4   Male   S1 <NA> 4.5
2   S5 Female   S3   S2 2.9
3   S6 Female   S1   S2 3.9
4   S7   Male   S4   S5 3.5
5   S8   Male   S3   S6 5.0
  S2 S1 S3 S4 S5 S6 S7 S8
1  0  0  0  1  0  0  0  0
2  0  0  0  0  1  0  0  0
3  0  0  0  0  0  1  0  0
4  0  0  0  0  0  0  1  0
5  0  0  0  0  0  0  0  1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.