Tensor product for penalty matrices
Computes the penalty matrices of a tensor product smooth from the marginal penalty matrices. The code is from
function tensor.prod.penalties
in mgcv
package.
tensor.prod.S(S)
S |
list of m marginal penalty matrices |
TS |
List of the penalty matrices associated with the tensor product smooth |
library(survPen) # tensor product between three penalty matrices set.seed(15) S1 <- matrix(rnorm(3*3),nrow=3,ncol=3) S2 <- matrix(rnorm(2*2),nrow=2,ncol=2) S1 <- 0.5*(S1 + t(S1) ) ; S2 <- 0.5*(S2 + t(S2) ) tensor.prod.S(list(S1,S2))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.