lingoes                 package:ade4                 R Documentation

_T_r_a_n_s_f_o_r_m_a_t_i_o_n _o_f _a _D_i_s_t_a_n_c_e _M_a_t_r_i_x _f_o_r _b_e_c_o_m_i_n_g _E_u_c_l_i_d_e_a_n

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

     transforms a distance matrix in a Euclidean one.

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

     lingoes(distmat, print = FALSE)

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

 distmat: an object of class 'dist'

   print: if TRUE, prints the eigenvalues of the matrix

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

     The function uses the smaller positive constant k which transforms
     the matrix of sqrt(dij + 2*k) in an Euclidean one

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

     returns an object of class 'dist' with a Euclidean distance

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

     Daniel Chessel chessel@biomserv.univ-lyon1.fr

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

     Lingoes, J.C. (1971) Some boundary conditions for a monotone
     analysis of symmetric matrices.  _Psychometrika_, *36*, 195-203.

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

     data(capitales)
     d0 <- as.dist(capitales$df)
     is.euclid(d0) # FALSE
     d1 <- lingoes(d0, TRUE)
     # Lingoes constant = 2120982
     is.euclid(d1) # TRUE
     plot(d0, d1)
     x0 <- sort(unclass(d0))
     lines(x0, sqrt(x0^2 + 2 * 2120982), lwd = 3)
      
     is.euclid(sqrt(d0^2 + 2 * 2120981), tol = 1e-10) # FALSE
     is.euclid(sqrt(d0^2 + 2 * 2120982), tol = 1e-10) # FALSE
     is.euclid(sqrt(d0^2 + 2 * 2120983), tol = 1e-10) 
         # TRUE the smaller constant

