covmat: covmat

View source: R/covmat.R

covmatR Documentation

covmat

Description

covmat

Usage

covmat(n, p, R = NULL, C = NULL, E = NULL, center = F)

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)

lori documentation built on April 4, 2025, 5:24 a.m.