MCMCped: Markov chain Monte Carlo Methods for Pedigree Reconstruction...

Description Usage Arguments Value Author(s) References See Also Examples

Description

Markov chain Monte Carlo methods for estimating the joint posterior distribution of a pedigree and the parameters that predict its structure using genetic and non-genetic data. These parameters can be associated with covariates of fecundity such as a sexually selected trait or age, or can be associated with spatial or heritable traits that relate parents to specific offspring. Population size, allele frequencies, allelic dropout rates, and stochastic genotyping error rates can also be simultaneously estimated.

Usage

1
2
3
4
MCMCped(PdP=PdataPed(), GdP=GdataPed(), sP=startPed(), tP=tunePed(), 
   pP=priorPed(), mm.tol=999, nitt = 13000, thin = 10,  burnin = 
   3000, write_postG = FALSE, write_postA=FALSE, write_postP = 
   "MARGINAL", checkP = FALSE, jointP = TRUE, DSapprox=FALSE, verbose=TRUE)

Arguments

PdP

optional PdataPed object containing phenotypic data

GdP

optional GdataPed object containing genetic data

sP

optional startPed object containing starting parameterisation

tP

optional tunePed object containg tuning parameters for Metropolis Hastings updates

pP

optional priorPed object containg prior specifications

mm.tol

maximum number of mismatches tollerated

nitt

number of MCMC iterations

thin

thinning interval of the Markov chain

burnin

the number of initial iterations to be discarded

write_postG

if TRUE the marignal posterior distribution of true genotypes is stored

write_postA

if TRUE the joint posterior distribution of allele frequencies is stored

write_postP

if "MARGINAL" the marginal distribution of parents is stored. If "JOINT" the joint distribution of parents (the pedigree) is stored.

checkP

if TRUE the pedigree is checked for legality, and illegal pedigrees rejected. If FALSE it is assumed that any potential parent would produce a legal pedigree, i.e one without circuits, in the terminology of graph theory.

jointP

if TRUE both parents are sampled simultaneously, if FALSE each parent is sampled conditional on the other. TRUE should mix faster, but FALSE should iterate faster, especially when relational="MATE" is passed to varPed

DSapprox

if TRUE the likelihood for models in which a relational="MATE" variable is passed is approximated. This can be much more efficient because the denominator of the multinomial is the summed linear pedictors for combinations in which i=m or j=m where m referes to the "MATE" at the current iteration.

verbose

if TRUE posterior samples and the Metropolis Hastings accpetance rates of beta, USdam, USsire, E1, E2 are printed to the screen every 1000 iterations.

Value

beta

an mcmc object containing samples from the posterior distribution of the population level parameters

USdam

an mcmc object containing samples from the posterior distribution of the number of unsampled females

USsire

an mcmc object containing samples from the posterior distribution of the number of unsampled males

E1

an mcmc object containing samples from the posterior distribution of allelic dropout rates for codominant markers or the probability of mis-scoring a dominant allele as recessive for dominant markers

E2

an mcmc object containing samples from the posterior distribution of stochasting genotyping error rates for codominant markers or the probability of mis-scoring a recessive allele as dominant for dominant markers

G

list of marginal distributions of true genotypes at each locus

A

list of mcmc objects containing samples from the posterior distribution of the base population allele frequencies at each locus

P

either samples from the posterior distribution of the pedigree, or the marginal distribution of parents

Author(s)

Jarrod Hadfield j.hadfield@ed.ac.uk

References

Hadfield J.D. et al (2006) Molecular Ecology 15 3715-31

See Also

getXlist

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
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=300, thin=1, burnin=0) 

plot(model1$beta)

MasterBayes documentation built on July 2, 2020, 2:11 a.m.