Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tensor.prod.S

Tensor product for penalty matrices


Description

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.

Usage

tensor.prod.S(S)

Arguments

S

list of m marginal penalty matrices

Value

TS

List of the penalty matrices associated with the tensor product smooth

Examples

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))

survPen

Multidimensional Penalized Splines for Survival and Net Survival Models

v1.5.1
GPL-3 | file LICENSE
Authors
Mathieu Fauvernier [aut, cre], Laurent Roche [aut], Laurent Remontet [aut], Zoe Uhry [ctb], Nadine Bossard [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.