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.

1 |

`X` |
a list of model matrices for the marginal bases of a smooth |

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!

Either a single model matrix for a tensor product smooth, or a list of penalty terms for a tensor product smooth.

Simon N. Wood simon.wood@r-project.org

Wood, S.N. (2006) “Low Rank Scale Invariant Tensor Product Smooths for Generalized Additive Mixed Models”. Biometrics 62(4):1025-1036

`te`

, `smooth.construct.tensor.smooth.spec`

1 2 | ```
X <- list(matrix(1:4,2,2),matrix(5:10,2,3))
tensor.prod.model.matrix(X)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.