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

constraint

Sum-to-zero constraint


Description

Applies the sum-to-zero constraints to design and penalty matrices.

Usage

constraint(X, S, Z = NULL)

Arguments

X

A design matrix

S

A penalty matrix or a list of penalty matrices

Z

A list of sum-to-zero constraint matrices; default is NULL

Value

List of objects with the following items:

X

Design matrix

S

Penalty matrix or list of penalty matrices

Z

List of sum-to-zero constraint matrices

Examples

library(survPen)

set.seed(15)

X <- matrix(rnorm(10*3),nrow=10,ncol=3)
S <- matrix(rnorm(3*3),nrow=3,ncol=3) ; S <- 0.5*( S + t(S))

# applying sum-to-zero constraint to a desgin matrix and a penalty matrix
constr <- constraint(X,S)

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.