Sum-to-zero constraint
Applies the sum-to-zero constraints to design and penalty matrices.
constraint(X, S, Z = NULL)
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 |
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 |
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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.