fwdtr                 package:Rfwdmv                 R Documentation

_M_a_x_i_m_u_m _l_i_k_e_l_i_h_o_o_d _e_s_t_i_m_a_t_e_s _o_f _t_r_a_n_s_f_o_r_m_a_t_i_o_n _p_a_r_a_m_e_t_e_r_s

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

     This function computes maximum likelihood estimates of
     transformation parameters. It uses the multivariate version of the
     parametric family of power transformations introduced by Box and
     Cox (1964).

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

     fwdtr(X, bsb = ellipse.subset, n.bsb, lambda = 1, one.lambda = FALSE, col.to.transform = "all", boundaries = c(-3, 3))

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

       X: a matrix or data frame containing a multivariate data set.

     bsb: usually a function of two variables: a matrix 'X' containing
          the multivariate data and the number of units in the initial
          subset 'n.bsb'.  Alternatively, the initial subset my be
          specified directly by providing an integer vector containing
          the indices of the units to include in the initial subset.

   n.bsb: the percentage of units forming the initial subset.  For
          example 'n.bsb = 40' implies that we start the search using
          'as.integer(nrow(X) * 0.4)' units. The default is 'n.bsb =
          50'.

  lambda: a scalar or a 'k x 1' vector containing set of transformation
          parameters.  The ordering of Mahalanobis distances at each
          step of the forward search uses variables transformed with
          'lambda'. If 'lambda' is a scalar all the variables in
          'col.to.transform' are transformed, for ordering Mahalanobis
          distances, using the commom supplied value. 

one.lambda: a logical value.  If 'TRUE' a common value 'lambda' is
          estimated for all variables specified in 'col.to.transform'.

col.to.transform: a 'k x 1' integer vector specifying the variables
          which must be transformed. If 'col.to.transform = "all"' all
          variables (columns of matrix 'X') are considered for
          transformation.

boundaries: the upper and lower bounds for the estimates of the values
          of the  transformation parameters.

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

     The analysis of data can often be improved by using transformed
     variables rather than the original variables themselves.  There
     are physical reasons why a transformation might be expected to be
     helpful in some examples. If the data arise from a counting
     process, they often have a Poisson distribution and the square
     root transformation will provide observations with an
     approximately constant variance, independent of the mean. 
     Similarly, concentrations are nonnegative variables and so cannot
     strictly be subject to additive errors of constant variance. 
     Unfortunately the estimated transformation and related test
     statistics  may be sensitive to the presence of one, or several,
     outliers.  With this function we use the forward search to see how
      estimates of the transformation parameters evolve as we move
     through the ordered data. If a correct value of 'lambda' has been
     found the parameter estimates will be stable until near the end of
     the search, where any outliers start to enter.

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

     a list with class 'fwdtr'.

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

     Fabrizio Laurini

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

     Atkinson, A. C., Riani, M. and Cerioli, A. (2004) Exploring
     Multivariate Data with the Forward Search.  Springer-Verlag New
     York.

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

     'fwdtr.object', 'profile.fwdtr.object'

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

      
     ## Forward search on untrasformed data 
     data(mussels.dat)
     l.mle <- fwdtr(mussels.dat)
     fwdtrMlePlot(l.mle)

     ## Forward search on transformed data as specified in vector lamdba 
     data(mussels.dat)
     l.mle <- fwdtr(mussels.dat,lambda = c(1, 0.5, 1, 0, 1/3))
     fwdtrMlePlot(l.mle)

     ## estimate a common value of lambda for all the variables and use 1/3 to order Mahalanobis distances in each step of the search
     data(mussels.dat)
     l.mle <- fwdtr(mussels.dat, lambda = 1/3, one.lambda = TRUE)
     fwdtrMlePlot(l.mle)

     ### Test variables 2 and 5
     ### The forward is based on untransformed data for variables 1, 3 and 4
     ### sqrt for variable 2 and third root for variable 5
     l.mle <- fwdtr(mussels.dat, lambda = c(0.5, 1/3), col.to.transform = c(2, 5))
     fwdtrMlePlot(l.mle)

