matW {GEInfo} | R Documentation |
Calculate matrix W
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
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
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)
[Package GEInfo version 1.0 Index]