fit2DWithin             package:stepNorm             R Documentation

_B_i_v_a_r_i_a_t_e _l_o_c_a_t_i_o_n _n_o_r_m_a_l_i_z_a_t_i_o_n _f_u_n_c_t_i_o_n _f_o_r _c_D_N_A _m_i_c_r_o_a_r_r_a_y _d_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

  x1.fun: Name of accessor method for spot row coordinates, usually
          'maSpotRow'.

  x2.fun: Name of accessor method for spot column coordinates, usually
          'maSpotCol'.

   y.fun: 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:

          _r_l_m_2_D_f_i_t for robust linear regression using the 'rlm'
               function

          _l_o_e_s_s_2_D_f_i_t for robust local regression using the 'loess'
               function

          _a_o_v_2_D_f_i_t for linear regression using the 'lm' function

          _s_p_a_t_i_a_l_M_e_d_f_i_t for spatial median normalization

     ...: Misc arguements for 'fun'

_D_e_t_a_i_l_s:

     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).

_V_a_l_u_e:

     The function 'fit2DWithin' returns a function (F) with bindings
     for 'x1.fun', 'x2.fun', 'y.fun', '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.

_A_u_t_h_o_r(_s):

     Yuanyuan Xiao, yxiao@itsa.ucsf.edu, 
      Jean Yee Hwa Yang, jean@biostat.ucsf.edu

_R_e_f_e_r_e_n_c_e_s:

     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.

_S_e_e _A_l_s_o:

     'fitWithin'

_E_x_a_m_p_l_e_s:

     ## use the swirl data as example
     data(swirl)

     ## 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)

