consensus              package:maanova              R Documentation

_B_u_i_l_d _c_o_n_s_e_n_s_u_s _t_r_e_e _o_u_t _o_f _b_o_o_t_s_t_r_a_p _c_l_u_s_t_e_r _r_e_s_u_l_t

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

     This is the function to build the consensus tree from the
     bootstrap clustering analysis. If the clustering algorithm is
     hierarchical clustering, the majority rule consensus tree will be
     built based on the given significance level. If the clustering
     algorithm is K-means, a consensus K-means group will be built.

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

     consensus(macluster, level = 0.8, draw=TRUE)

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

macluster: An object of class 'macluster', which is the output of
          'macluster'

   level: The significance level for the consensus tree. This is a
          numeric number between 0.5 and 1.

    draw: A logical value to indicate whether to draw the consensus
          tree on screen or not.

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

     An object of class 'consensus.hc' or 'consensus.kmean' according
     to the clustering method.

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

     Hao Wu

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

     'macluster'

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

     # load in data
     data(paigen)
     # make data object with rep 2
     paigen <- createData(paigen.raw, 2)
     # make interactive model
     model.int.fix <- makeModel(data=paigen,
           formula=~Dye+Array+Strain+Diet+Strain:Diet)
     # fit ANOVA model
     anova.int <- fitmaanova(paigen, model.int.fix)
     # test interaction effect 
     ## Not run: test.int.fix <- matest(paigen, model.int.fix, term="Strain:Diet", n.perm=100)
     # pick significant genes - pick the genes selected by Fs test
     idx <- volcano(test.int.fix)$idx.Fs

     # do k-means cluster on genes
     gene.cluster <- macluster(anova.int, "Strain:Diet", idx, "gene",
         "kmean", kmean.ngroups=5)
     # get the consensus group
     consensus(gene.cluster, 0.5)

     # HC cluster on samples
     sample.cluster <- macluster(anova.int, "Strain:Diet", idx, "sample","hc")
     # get the consensus group
     consensus(sample.cluster, 0.5)## End(Not run)

