model.matrix.egf {epigrowthfit} | R Documentation |
Extract Design Matrices
Description
Extracts from a model object fixed and random effects design matrices.
Usage
## S3 method for class 'egf'
model.matrix(object, which = c("fixed", "random"),
top = NULL, random = NULL, ...)
Arguments
object |
an |
which |
a character string controlling what is returned:
|
top |
a character string specifying a top level nonlinear model parameter.
|
random |
a random effect term, which is a call to binary operator |
... |
unused optional arguments. |
Details
model.matrix(which = "fixed", top = NULL)
returns the result of combining (in the sense of cbind
)
all fixed effects design matrices.
model.matrix(which = "random", top = "<name>", random = NULL)
returns the result of combining all random effects design matrices
associated with parameter top
.
model.matrix(which = "random", top = NULL, random = NULL)
returns the result of combining all random effects design matrices
and permuting the columns to obtain a convenient ordering of
random effect coefficients.
(Coefficients are sorted by relation to a common random vector.
Random vectors are sorted by relation to a common covariance matrix.)
None of these “combined” design matrices possesses attributes
assign
and contrasts
.
Value
A (sparse) dgCMatrix or a traditional
(dense) matrix, with attributes assign
and contrasts
except in special cases; see ‘Details’.
See Also
The generic function model.matrix
.