csr() provides the general constraint-matrix interface underlying custom covariance patterns for mmer/vsr. Unlike dsr and usr, it does not construct a predefined diagonal or unstructured pattern. Instead, the supplied matrix mm determines the covariance-component structure through thetaC.
Conceptually, thetaC identifies which elements of the covariance matrix are associated with estimated variance-covariance components and which constraints are shared among elements. The interpretation of the entries therefore follows the thetaC convention used by vsr.
When x is a matrix it is used directly as \(Z\). Otherwise, factors and character vectors are converted to incidence matrices, while numeric non-factor inputs are treated as a single design column.
The function assigns the column names of \(Z\) to both dimensions of mm; therefore mm should be conformable with the number of columns of the resulting design matrix.