startPed {MasterBayes}R Documentation

startPed Object

Description

An object containing the starting parameterisation of a model, and logical variables indicating wether parameters should be estimated or fixed at the starting parameterisation. By default the starting parameterisation is obtained through a mixture of Maximum Likelihood and heuristic techniques.

Usage

startPed(id=NULL, G=NULL, estG=TRUE, A=NULL, estA=TRUE, E1=NULL, 
   estE1=TRUE, E2=NULL, estE2=TRUE, dam=NULL,sire=NULL, estP=TRUE, 
   beta=NULL, estbeta=TRUE,  USdam=NULL, estUSdam=TRUE, 
   USsire=NULL, estUSsire=TRUE, ...)

Arguments

id vector of indivual id's for G, dam and sire
G list of genotype objects
estG logical; should genotypes be estimated?
A list of allele frequencies
estA logical; should base-population allele frequencies be estimated?
E1 vector of allelic dropout rates for codominat markers or probability of mis-scoring a dominant allele as recessive for dominant markers (default=0.005)
estE1 logical; should allelic dropout rates be estimated?
E2 vector of stochastic genotyping error rates for codominat markers or probability of mis-scoring a recessive allele as dominant for dominant markers (default=0.005)
estE2 logical; should stochastic error rates be estimated?
dam vector of dam's. If the dam is unknown use NA. All dam's must be in id
sire vector of sire's. If the sire is unknown use NA. All sire's must be in id
estP logical; should the pedigree be estimated?
beta vector of population-level parameters
estbeta logical; should the population-level parameters be estimated?
USdam vector of unsampled female population sizes
estUSdam logical; should the female population sizes be estimated?
USsire vector of unsampled male population sizes
estUSsire logical or character; if TRUE the male population size is estimated separately from the female population size, if "USdam" male and female population sizes are constrained to be the same.
...

Details

If estG=FALSE an approximation is used for genotyping error. In this case error rates and allele frequencies are not estimated but fixed at the starting parameterisation. If indivdiuals have been typed more than once, then the approxiamtion only uses the genotype that first appears in the GdP$G object passed to MCMCped. If A is not specified estimates are taken directly from GdP$G using extractA. If E1 and E2 are not specified they are set to 0.005. Note that if the approximation for genotyping error is used with codominant markers, Wang's (2005) model is not used, and the CEVUS model (Marshall 1998) is adopted. In this case E2 is the per-allele error rate and E2(2-E2) is the per-genotype error rate used by CERVUS. If dam and sire are not specified the most likely set of parents given the genetic data are used (see MLE.ped). The starting value of beta, if not given, is the MLE of beta given the starting pedigree (see MLE.beta). The starting values of USdam and USsire, if not given, are the MLE based on the genotype data (see MLE.popsize).

Value

list containing the arguments passed

Author(s)

Jarrod Hadfield j.hadfield@ed.ac.uk

See Also

MCMCped

Examples

# In this example we simulate a pedigree and then fix the
# pedigree and estimate the population level paarmeters

data(WarblerP)

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)
simped<-simpedigree(PdP, beta=-0.25)

# simulate a pedigree where paternity drops with distance (beta=-0.25)

sP<-startPed(dam=simped$ped[,2], sire=simped$ped[,3], estP=FALSE)
model1<-MCMCped(PdP=PdP, sP=sP, nitt=3000, thin=2, burnin=1000) 
plot(model1$beta)

# The true underlying value is -0.25


[Package MasterBayes version 2.42 Index]