pdConstruct.pdBlocked | R Documentation |
This function give an alternative constructor for the 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.
## S3 method for class 'pdBlocked'
pdConstruct(object, value, form, nam, data, pdClass,
...)
object |
an object inheriting from class |
value |
an optional list with elements to be used as the
|
form |
an optional list of one-sided linear formula specifying the
row/column names for the block-diagonal elements of the matrix
represented by |
nam |
an optional list of vector of character strings specifying the
row/column names for the block-diagonal elements of the matrix
represented by object. Each of its components must have
length equal to the dimension of the corresponding block-diagonal
element and unreplicated elements. This argument is ignored when
|
data |
an optional data frame in which to evaluate the variables
named in |
pdClass |
an optional vector of character strings naming the
|
... |
some methods for this generic require additional arguments. None are used in this method. |
a pdBlocked
object representing a positive-definite
block-diagonal matrix, also inheriting from class pdMat
.
José Pinheiro and Douglas Bates bates@stat.wisc.edu
Pinheiro, J.C., and Bates, D.M. (2000) "Mixed-Effects Models in S and S-PLUS", Springer.
as.matrix.pdMat
,
coef.pdMat
,
pdBlocked
,
pdClasses
,
pdConstruct
,
matrix<-.pdMat
pd1 <- pdBlocked(list(c("A","B"), c("a1", "a2", "a3")))
pdConstruct(pd1, list(diag(1:2), diag(c(0.1, 0.2, 0.3))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.