modeG              package:MasterBayes              R Documentation

_P_o_s_t_e_r_i_o_r _M_o_d_e _o_f _G_e_n_o_t_y_p_e_s

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

     Finds the mode of the posterior marginal distribution of genotypes

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

     modeG(postG, threshold=0, ...)

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

   postG: posterior distribution of genotypes from an 'MCMCped' model
          with argument 'write_postG=TRUE'

threshold: threshold probability under which ML genotypes are replaced
          by NA

     ...: further arguments to be passed

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

       G: list of 'genotype' objects

      id: id vector

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

     Jarrod Hadfield j.hadfield@sheffield.ac.uk

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

     Hadfield J.D. _et al_, Molecular Ecology

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

     'MCMCped', 'genotype'

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

     data(WarblerP)
     data(WarblerG)
     GdP<-GdataPed(WarblerG)

     var1<-expression(varPed(c("lat", "long"), gender="Male", 
       relational="OFFSPRING"))

     # paternity is to be modelled as a function of distance 
     # between offspring and male territories

     res1<-expression(varPed("offspring", restrict=0))

     # indivdiuals from the offspring generation are excluded as parents

     res2<-expression(varPed("terr", gender="Female", relational="OFFSPRING", 
       restrict=TRUE))

     # mothers not from the offspring territory are excluded
      
     PdP<-PdataPed(formula=list(var1,res1,res2), data=WarblerP, USsire=FALSE)
     tP<-tunePed(beta=30)

     model1<-MCMCped(PdP=PdP, GdP=GdP, tP=tP, nitt=3000, thin=2, burnin=1000, write_postG=TRUE) 

     G<-modeG(model1$G)$G
     summary(G[[1]])

