covmat {mimi} | R Documentation |
construct covariate matrix (predictor matrix) in the right format for input to the mimi or cv.mimi functions from tables of attributes about the rows or columns of data frames.
Description
construct covariate matrix (predictor matrix) in the right format for input to the mimi or cv.mimi functions from tables of attributes about the rows or columns of data frames.
Usage
covmat(n, p, R = NULL, C = NULL, E = NULL, center = T)
Arguments
n |
number of rows |
p |
number ofcolumns |
R |
nxK1 matrix of row covariates |
C |
nxK2 matrix of column covariates |
E |
(n+p)xK3 matrix of row-column covariates |
center |
boolean indicating whether the returned covariate matrix should be centered (for identifiability) |
Value
the joint product of R and C column-binded with E, a (np)x(K1+K2+K3) matrix in order row1col1,row2col1,...,rowncol1, row1col2, row2col2,...,rowncolp
Examples
R <- matrix(rnorm(10), 5)
C <- matrix(rnorm(9), 3)
covs <- covmat(5,3,R,C)
[Package mimi version 0.2.0 Index]