matW: Calculate matrix W

Description Usage Arguments Value Examples

View source: R/matW.R

Description

Calculate observed matrix W for all G variables and G-E interactions. Denote Wj as the n x (q+1) sub-matrix of W corresponding the jth G variable. The first column of Wj is the observation vector of the jth G variable, and the rest q columns of Wj are observations of G-E interactions.

Usage

1
matW(E, G)

Arguments

E

Observed matrix of E variables, of dimension n x q.

G

Observed matrix of G variables, of dimensions n x p.

Value

A matrix of dimension n x [p(q+1)].

Examples

1
2
3
4
n <- 30; q <- 3; p <- 5;
E <- MASS::mvrnorm (n, rep (0, q), diag (q))
G <- MASS::mvrnorm (n, rep (0, p), diag (p))
W <- matW (E, G)

GEInfo documentation built on Jan. 11, 2022, 1:07 a.m.

Related to matW in GEInfo...