bdsmatrix.ibd {bdsmatrix}  R Documentation 
Routines that create identitybydescent (ibd) coefficients
often output their results as a list of values (i, j, x[i,j]),
with unlisted values of the x matrix assumed to be zero.
This routine recasts such a list into
bdsmatrix
form.
bdsmatrix.ibd(id1, id2, x, idmap, diagonal)
id1 
row identifier for the value, in the final matrix.
Optionally, 
id2 
column identifier for the value, in the final matrix. 
x 
the value to place in the matrix 
idmap 
a two column matrix or data frame.
Sometimes routines create output with integer values for

diagonal 
If diagonal elements are not preserved in the list, this value
will be used for the diagonal of the result.
If the argument appears, then the output matrix will contain
an entry for each value in 
The routine first checks for nonsymmetric or otherwise inconsistent input.
It then groups observations together into ‘families’ of
related subjects, which determines the structure of the final matrix.
As with the makekinship
function,
singletons with no relationships are first in the output matrix, and
then families appear one by one.
a bdsmatrix
object representing a
blockdiagonal sparse matrix.
bdsmatrix, kinship, coxme, lmekin
## Not run:
ibdmat < bdsmatrix.ibd(i,j, ibdval, idlist=subject)
## End(Not run)