maxConnectedSet            package:pheno            R Documentation

_M_a_x_i_m_a_l _c_o_n_n_e_c_t_e_d _s_e_t _i_n _a _m_a_t_r_i_x

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

     Finds connected data set, i.e. connected rows and columns of a
     numeric matrix M, that has the largest number of data entries.

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

     maxConnectedSet(M)

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

       M: Numeric matrix with missing values considered as 0, or a data
          frame. The data frame is internally converted to a matrix and
          should have three columns (x, factor 1, factor 2) where x are
          considered the entries of the matrix, rows correspond to 
          levels of factor 2 and columns correspond to levels of factor
          1.

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

     In a two-way classification of linear models sometimes independent
     sets of normal equations are obtained due to missing data in the
     experiments design, i.e. the complete design matrix is not of full
     rank and thus no solution can be found. However, solutions of the
     independent sets of normal equations can still exist. This
     phenomenon is called 'connectedness' of the data. Especially in
     phenological analysis experimental designs are almost always
     unbalanced because of missing data. Thus, when combined time
     series are to be estimated, it is worth checking for and finding
     connected data sets for which combined time series can then be
     estimated. This can also be interpreted in the way that a
     prerequisite to obtain a combined time series is to have
     overlapping time series. Example (also see example data(Searle)
     from Searle (1997), page 324 and example in 'connectedSets'): In
     the following matrix dots represent missing values, X represent
     observations and the lines join the connected sets:

     :       X___.___.___.___X   .   .   .               
      :                       |                           
      :       .   .   X___.___!___.___.___X    
      :                       |           |
      :       .   X___.___.___!___X___X   !
      :                       |       |   |
      :       .   X___.___.___!___X___X   !
      :                       |           |
      :       .   .   .   .   X   .   .   !                                        
      :                       |           |
      :       .   .   X___.___!___.___.___X    
      :                       |                           
      :       .   .   .   X___X   .   .   .                                     

     Thus, in this matrix observations of rows 1, 5 and 7 or colums 1,
     4 and 5 form one connected set. Likewise observations of rows 2
     and 6 (or columns 3 and 8) and rows 3 and 4 (or columns 2, 6 and
     7) form also connected sets, respectively.

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

      ms: maximal connected set as matrix or data frame, corresponding
          to the input.

    maxl: Number of observations in the maximal connected data set.

   nsets: Number of connected data sets.

   lsets: Vector with number of observations in each connected data
          sets, i.e. lsets[i] is the number of observations in
          connected data set i.

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

     Joerg Schaber

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

     Searle (1997) 'Linear Models'. Wiley. page 318.

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

     'connectedSets'

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

             data(Searle)
             maxConnectedSet(Searle)

