bdsmatrix-class {bdsmatrix} | R Documentation |
Representation for a Block Diagonal Sparse matrix
Objects of this class are usually created using the bdsmatrix
,
bdsI
or bdsBlock
functions.
The result is a symmetrix matrix whose upper left portion is block-diagonal,
with an optional border on the right and bottom that is dense.
The matrices were originally created to represent familial correlation
structures, which have a block for each family but no connection between
families.
blocksize
:blocks
:rmat
:offdiag
:Dim
:Dimnames
:signature(x = "matrix", y = "bdsmatrix")
: the result
will be an ordinary matrixsignature(x = "numeric", y = "bdsmatrix")
: the result
will be a vectorsignature(x = "bdsmatrix", y = "matrix")
: the result
will be an ordinary matrixsignature(x = "bdsmatrix", y = "numeric")
: the result
will be a vectorsignature(x = "bdsmatrix")
: signature(x = "bdsmatrix")
: signature(e1 = "bdsmatrix", e2 = "numeric")
: signature(e1 = "bdsmatrix", e2 = "bdsmatrix")
: signature(e1 = "bdsmatrix", e2 = "matrix")
: signature(e1 = "numeric", e2 = "bdsmatrix")
: signature(e1 = "matrix", e2 = "bdsmatrix")
: signature(x = "bdsmatrix")
: if the subscripts are a
set of increasing integers, and the row and column subscripts are identical,
then the result is aslo a bdsmatrix. This is useful for example to create
the kinship matrix for all females from an overall kinship matrix. If the
subscripts do not match, then an ordinary matrix is createdsignature(x = "bdsmatrix")
: ... signature(x = "bdsmatrix")
: ... signature(from = "bdsmatrix", to = "matrix")
: ... signature(from = "bdsmatrix", to = "vector")
: ... signature(x = "bdsmatrix")
: retrieve the diagonal of
the matrixsignature(x = "bdsmatrix")
: set the diagonal of the
matrix to a given valuesignature(x = "bdsmatrix")
: dimension of the matrixsignature(x = "bdsmatrix")
: dimnames of the
matrixsignature(x = "bdsmatrix")
: set the dimnames of
the matrixsignature(x = "bdsmatrix")
: generalized cholesky
decomposition of the matrix signature(x = "bdsmatrix")
: maximum of the matrixsignature(x = "bdsmatrix")
: minimum of the matrixsignature(x = "bdsmatrix")
: signature(x = "bdsmatrix")
: signature(object = "bdsmatrix")
: print out the matrixsignature(x = "bdsmatrix")
:
Many of the actions above will result in conversion to an ordinary matrix
object, including print
, addition to an ordinary matrix, etc.
This can easily create objects that are too large for system memory.
By default the value of options('bdsmatrixsize') is consulted first, and
if the resulting object would be have a length greater than this option
the conversion an error is generated and conversion is not attempted.
The default value for the option is 1000.
Terry Therneau
showClass("bdsmatrix")