| preprocessings {PTAk} | R Documentation |
Few useful functions for preprocessing arrays
Description
Choices of centering or detrending and scaling are important preprocessings for multiway analysis.
Usage
Multcent(dat,bi=c(1,2),by=3,
centre=mean,
centrebyBA=c(TRUE,FALSE),scalebyBA=c(TRUE,FALSE))
IterMV(n=10,dat,Mm=c(1,3),Vm=c(2,3),
fFUN=mean,usetren=FALSE,
tren=function(x)smooth.spline(as.vector(x),df=5)$y,
rsd=TRUE)
Detren(dat,Mm=c(1,3),rsd=TRUE,
tren=function(x)smooth.spline(as.vector(x),df=5)$y )
Susan1D(y,x=NULL,sigmak=NULL,sigmat=NULL,
ker=list(function(u)return(exp(-0.5*u**2))))
Arguments
dat |
array |
bi |
vector defining the "centering, bicentering or multi-centering" one wants
to operate crossed with |
by |
number or vector defining the entries used "with" in the other operations |
centre |
function used as |
centrebyBA |
a bolean vector for "centering" with |
scalebyBA |
idem as centrebyBA, for scaling operation |
n |
number of iterations between "centering" and scaling |
Mm |
margins to performs |
Vm |
margins to scale |
fFUN |
function to use as |
usetren |
logical, to use |
tren |
function to use in |
rsd |
logical passed into |
y |
vector (length |
x |
vector of same length, if |
sigmak |
parameter related to kernel bandwidth with |
sigmat |
parameter related to kernel bandwidth with |
ker |
a list of two kernels |
Details
Multcent performs in order "centering" by by;
"multicentering" for every bi with by; then scale
(standard deviation) to one by by.
IterMV performs an iterative "detrending" and scaling
according to te margins defined (see Leibovici(2000) and references
in it).
Detren detrends (or smooths if rsd is FALSE)
the data accoding to th margins given.
Susan1D performs a non-linear kernel smoothing of y
against x (both reordered in the function according to orders
of x) with an usual kernel (t) as for kernel
regression and a kernel (t) for the values of y (the
product of the kernels constitutes the non-linear weightings. This
function is adapted from SUSAN algorithm (see references).
Author(s)
Didier G. Leibovici
References
Smith S.M. and J.M. Brady (1997) SUSAN - a new approach to low level image processing. International Journal of Computer Vision, 23(1):45-78, May 1997.