powered by
Function for transformations of the form \(Ax + b\) or \(A^{1/2}x + b\)
affine.trans(X, A = diag(1, dim(X)[2]), b = rep(0, dim(X)[2]), A.sqrt = FALSE, na.action = na.fail)
a matrix.
a numeric data frame or matrix with p columns.
full rank p times p matrix.
numeric vector of length p.
logical. If TRUE the symmetric square root of A will be used.
TRUE
a function which indicates what should happen when the data contain 'NA's. Default is to fail.
Klaus Nordhausen
data(iris) IRIS <- iris[,1:4] colMeans(IRIS) cov(IRIS) IRIS.trans <- affine.trans(IRIS, solve(cov(IRIS)), colMeans(IRIS),TRUE) colMeans(IRIS.trans) cov(IRIS.trans)
Run the code above in your browser using DataLab