covmat: covmat

Description Usage Arguments Value Examples

Description

covmat

Usage

1
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

1
2
3
R <- matrix(rnorm(10), 5)
C <- matrix(rnorm(9), 3)
covs <- covmat(5,3,R,C)

genevievelrobin/gammit documentation built on May 3, 2019, 2:58 p.m.