tensor.prod.model.matrix: Utility functions for constructing tensor product smooths
Description
Produce model matrices or penalty matrices for a tensor product smooth from the model matrices or
penalty matrices for the marginal bases of the smooth.
Usage
tensor.prod.model.matrix(X)
Arguments
X
a list of model matrices for the marginal bases of a smooth
Value
Either a single model matrix for a tensor product smooth, or a list of penalty terms for a tensor
product smooth.
Details
If X[[1]], X[[2]] ... X[[m]] are the model matrices of the marginal bases of
a tensor product smooth then the ith row of the model matrix for the whole tensor product smooth is given by
X[[1]][i,]%x%X[[2]][i,]%x% ... X[[m]][i,], where %x% is the Kronecker product. Of course
the routine operates column-wise, not row-wise!