pdBlocked
class,
representing a positive-definite block-diagonal matrix. Each
block-diagonal element of the underlying matrix is itself a
positive-definite matrix and is represented internally as an
individual pdMat
object. When value
is
numeric(0)
, a list of uninitialized pdMat
objects, a
list of one-sided formulas, or a list of vectors
of character strings, object
is returned
as an uninitialized pdBlocked
object (with just some of its
attributes and its class defined) and needs to have its coefficients
assigned later, generally using the coef
or matrix
replacement
functions. If value
is a list of initialized pdMat
objects, object
will be constructed from the list obtained by
applying as.matrix
to each of the pdMat
elements of
value
. Finally, if value
is a list of numeric vectors,
they are assumed to represent the unrestricted coefficients
of the block-diagonal elements of the underlying positive-definite
matrix.pdBlocked(value, form, nam, data, pdClass)
value
argument to other pdMat
constructors. These
include: pdMat
objects, positive-definite
matrices, one-sided linear formulas, vectors of character strings,object
. Because factors may be present in
form
, the formulas needs to be evaluatevalue
and form
. It is used to
obtain the levels for factors
, which affect the
dimensions and the row/column names of the underlying matrix. pdMat
classes to be assigned to the individual blocks in the
underlying matrix. If a single class is specified, it is used for all
block-diagonal elements. This argument will only bepdBlocked
object representing a positive-definite
block-diagonal matrix, also inheriting from class pdMat
.as.matrix.pdMat
, coef.pdMat
,
matrix<-.pdMat
pd1 <- pdBlocked(list(diag(1:2), diag(c(0.1, 0.2, 0.3))),
nam = list(c("A","B"), c("a1", "a2", "a3")))
pd1
Run the code above in your browser using DataLab