Posterior Mode of Genotypes

Share:

Description

Finds the mode of the posterior marginal distribution of genotypes

Usage

1
modeG(postG, threshold=0)

Arguments

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

Value

G

list of genotype objects

id

id vector

Author(s)

Jarrod Hadfield j.hadfield@ed.ac.uk

References

Hadfield J.D. et al, Molecular Ecology

See Also

MCMCped, genotype

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Not run: 
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="=="))

# 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]])

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.