| mc_ns | R Documentation |
Constructs the components of the matrix linear predictor associated with a fully non-structured covariance model in multivariate covariance generalized linear models. This specification allows each pair of observations within a unit to have its own covariance parameter, resulting in a highly flexible but parameter-intensive model.
Due to the quadratic growth in the number of parameters, this structure is typically suitable only for datasets with a small number of repeated measurements per unit.
mc_ns(id, data, group = NULL, marca = NULL)
id |
A character string giving the name of the column in
|
data |
A |
group |
An optional character string giving the name of a column in
|
marca |
An optional character string specifying the level of
|
The function requires a balanced design, meaning that all units
identified by id must have the same number of observations.
An error is raised otherwise. When group and marca are
provided, covariance components are generated only for units not
belonging to the specified level marca; for those units, the
corresponding blocks are set to zero.
A list of symmetric block-diagonal matrices, each representing one
covariance component of the non-structured matrix linear predictor.
The length of the list is equal to n(n - 1) / 2, where n is
the number of observations per unit. Each element of the list is a
sparse matrix of class "dgCMatrix" obtained by stacking unit-
specific covariance blocks along the diagonal. These matrices are used
internally to construct the dispersion linear predictor in
mcglm.
Wagner Hugo Bonat, wbonat@ufpr.br
Bonat, W. H. (2018). Multiple Response Variables Regression Models in R: The mcglm Package. Journal of Statistical Software, 84(4), 1–30.
mc_id, mc_dglm, mc_dist, mc_ma,
mc_rw, mc_mixed
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.