# NOT RUN {
# When each individual has only been genotyped once, and no pedigree
# information exists, there is virtually no information available
# to estimate error rates. The tiny amount of information comes
# (dangerously) from the assumption of Hardy-Weinburg equilibrium.
# The posterior distribution is similar to the prior:
data(WarblerG)
A<-extractA(WarblerG)
ped<-matrix(NA, 100,3)
ped[,1]<-1:100
G<-simgenotypes(A, E1=0.01, E2=0.01, ped=ped, no_dup=1)
GdP<-GdataPed(G=G$Gobs, id=G$id)
pP<-priorPed(E1=matrix(c(40,1600), nrow=1), E2=matrix(c(40,1600), nrow=1))
model1<-MCMCped(GdP=GdP, pP=pP)
#The posterior distribution recovers the prior distribution
summary(model1$E1)
quantile(rbeta(1000, 40, 1600), prob=c(0.025, 0.25, 0.5, 0.75, 0.975))
# }
Run the code above in your browser using DataLab