fit2DWithin {stepNorm}R Documentation

Bivariate location normalization function for cDNA microarray data


This function performs 2D location normalization on cDNA micoroarray. It operates on class marrayRaw or class marrayNorm. It allows the user to choose from a set of four basic normalization procedures.


fit2DWithin( = "maSpotRow", = "maSpotCol", = "maM",
subset=TRUE, fun = aov2Dfit, ...)

Arguments Name of accessor method for spot row coordinates, usually maSpotRow. Name of accessor method for spot column coordinates, usually maSpotCol. Name of accessor method for spot statistics, usually the log-ratio maM.
subset A "logical" or "numeric" vector indicating the subset of points used to compute the normalization values.
fun Character string specifying the normalization procedures:
for robust linear regression using the rlm function
for robust local regression using the loess function
for linear regression using the lm function
for spatial median normalization
... Misc arguements for fun


The spot statistic named in y is regressed on spot row and column coordinates, using the function specified by the argument fun. Typically, rlm2Dfit and loess2Dfit, which treat row and column coordinates as numeric vectors, require a lot fewer parameters than aov2Dfit which specifies these two variables as categorical. spatialMedfit could yet fit the most complicated model, depending on size of the smoothing window specified; details see Wison et al (2003).


The function fit2DWithin returns a function (F) with bindings for,,, subset and fun. When the function F is evaluated with an object of class marrayNorm or marrayRaw, it carries out normalization and returns an object of class marrayFit that contains the normalization information as a list with the following components:

varfun : A character vector of names of predictor variables.
x : A numeric matrix of predictor variables.
y : A numeric matrix of repsonses.
residuals : A numeric matrix of normalized values (typically log ratios (M)).
fitted : A numeric matrix of the fitted values.
enp : The equivalent number of parameters; see loess.
df.residual : The residual degrees of freedom.
fun : A character string indicating the name of the function used for normalization.

Note that the residuals component stores the normalized ratios.


Yuanyuan Xiao,,
Jean Yee Hwa Yang,


Y. H. Yang, S. Dudoit, P. Luu, and T. P. Speed (2001). Normalization for cDNA microarray data. In M. L. Bittner, Y. Chen, A. N. Dorsel, and E. R. Dougherty (eds), Microarrays: Optical Technologies and Informatics, Vol. 4266 of Proceedings of SPIE.

D. L. Wilson, M. J. Buckley, C. A. Helliwell and I. W. Wilson (2003). New normalization methods for cDNA microarray data. Bioinformatics, Vol. 19, pp. 1325-1332.

See Also



## use the swirl data as example

## 2D rlm normalization
rlm2D <- fit2DWithin(fun="rlm2Dfit")
swirl1.rlm <- rlm2D(swirl[,1])
norm.M <- swirl1.rlm$residuals ## matrix of normalized ratios

## 2D loess normalization, default span=0.2
loess2D <- fit2DWithin(fun="loess2Dfit")
swirl1.loess <- loess2D(swirl[,1])
## 2D loess normalization, span=0.4
## Not run: 
loess2D.1 <- fit2DWithin(fun="loess2Dfit", span=0.4)
swirl1.loess.1 <- loess2D.1(swirl[,1])
## End(Not run)

## 2D aov normalization
aov2D <- fit2DWithin(fun="aov2Dfit")
swirl1.aov <- aov2D(swirl[,1])

## 2D spatial median normalization, default window width=3
spatialMed2D <- fit2DWithin(fun="spatialMedfit")
swirl1.spatialMed <- spatialMed2D(swirl[,1])
## 2D loess normalization, window width=9
## Not run: 
spatialMed2D.1 <- fit2DWithin(fun="spatialMedfit", width=9)
swirl1.spatialMed.1 <- spatialMed2D.1(swirl[,1])
## End(Not run)

[Package stepNorm version 1.0.2 Index]