varcomp              package:hierfstat              R Documentation

_E_s_t_i_m_a_t_e_s _v_a_r_i_a_n_c_e _c_o_m_p_o_n_e_n_t_s _f_o_r _e_a_c_h _a_l_l_e_l_e _o_f _a _l_o_c_u_s

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

     Estimates variance components for each allele for a (fully)
     hierarchical random design defined by all but the last column of
     the data frame  'data', the last column containing the genetic
     data to analyse. Columns for the hierarchical design should be
     given from the outermost to the innermost before the individual
     (e.g. continent, region, population, patch,...)

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

     varcomp(data,diploid=TRUE)

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

    data: a data frame that contains the different factors from the
          outermost (e.g. region) to the innermost before the
          individual. the last column of the data frame 'data' contains
          the locus to analyse, which can be multiallelic. Missing data
          are allowed.

 diploid: a boolean stating whether the data come from diploid
          (TRUE=default) or haploid (FALSE) organisms

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

     The format for genotypes is simply the code for the 2 alleles put
     one behind the other, without space in between. For instance if
     allele 1 at the locus has code '23' and allele 2 '39', the
     genotype format is '2339'.

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

      df: the degrees of freedom for each level

       k: the k matrix, the coefficients associated with the variance
          components

     res: the variance components for each allele

 overall: the variance components summed over alleles

       F: a matrix of hierarchical F-statistics type-coefficients with
          the first line corresponding to
          F_{(n-1)/n},F_{(n-2)/n}...F_{i/n} and the diagonal
          corresponding to F_{(n-1)/n}, F_{(n-2)/(n-1)},F_{i/2}

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

     Jerome Goudet, DEE, UNIL,  CH-1015 Lausanne Switzerland 

     jerome.goudet@unil.ch

     <URL: http://www.unil.ch/popgen/people/jerome.htm>

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

     Goudet J. (2005). Hierfstat, a package for R to compute and test
     variance components and F-statistics. Molecular Ecology Notes.
     5:184-186

     Weir, B.S. (1996) Genetic Data Analysis II. Sinauer Associates.

     Yang, R.C. (1998). Estimating hierarchical F-statistics. Evolution
     52(4):950-956

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

     'varcomp.glob'.

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

     #load data set
     data(gtrunchier)
     attach(gtrunchier)
     #
     varcomp(data.frame(Locality,Patch,L21.V))

