powered by
Calculates the row-wise Kronecker product between two matrices with the same number of rows.
row.kronecker(X, Y)
Matrix of dimension \(n \times pq\) where each row contains the Kronecker product between the corresponding rows of X and Y.
X
Y
matrix of dimension \(n \times p\)
matrix of dimension \(n \times q\)
Nathaniel E. Helwig <helwig@umn.edu>
Given X of dimension c(n, p) and Y of dimension c(n, q), this function returns
c(n, p)
c(n, q)
cbind(x[,1] * Y, x[,2] * Y, ..., x[,p] * Y)
which is a matrix of dimension c(n, p*q)
c(n, p*q)
Used by the rk.model.matrix to construct basis functions for interaction terms
rk.model.matrix
See kronecker for the regular kronecker product
kronecker
X <- matrix(c(1, 1, 2, 2), nrow = 2, ncol = 2) Y <- matrix(1:6, nrow = 2, ncol = 3) row.kronecker(X, Y)
Run the code above in your browser using DataLab