Last chance! 50% off unlimited learning
Sale ends in
Finds the MLE for the number of unsampled males and/or females following Nielsen et al. (2001). The size of the unsampled population can vary over time and space, and genotyping error is accomodated using the CERVUS model of genotyping error (Kalinwoski et al. 2006).
MLE.popsize(X.list, USdam=FALSE, USsire=FALSE, nUS=NULL,
ped=NULL, shrink=NULL)
list of design matrices for each offspring derived using getXlist
logical or character; if TRUE
a single undiferentiated population of unsampled females exists. If USdam
is a character vector it must have the same length as the number of offspring (length(X.list$X)
) with factor levels representing sub-populations (in time or space) over which the number of unsampled females vary.
logical or character; if TRUE
a single undiferentiated population of unsampled males exists. if USsire
is a character vector it must either have the same length as the number of offspring (length(X.list$X)
) with factor levels representing sub-populations (in time or space) over which the number of unsampled males vary, or alternatively "USdam"
, in which case the unsampled male and female populations are constrained to be equal.
optional starting vector for the size of the unsampled population. Parmeters for the unsampled female population come before the male population.
optional pedigree with id, dam and sire in ech column
optional scalar for the variance defining the ridge-regression likelihood penalisation.
vector of MLE's for the size of the unsampled population. Lower bound is 1e-5 for numerical stability.
large sample variance-covariance matrix of nUS
MLE's
Nielsen. R. et.al Genetics (2001) 157 4 1673-1682
# NOT RUN {
data(WarblerP)
data(WarblerG)
GdP<-GdataPed(WarblerG)
res1<-expression(varPed("offspring", restrict=0))
PdP<-PdataPed(formula=list(res1), data=WarblerP, USsire=TRUE, USdam=TRUE)
X.list<-getXlist(PdP=PdP, GdP=GdP, E2=0.02)
nUS<-MLE.popsize(X.list, USsire=TRUE, USdam=TRUE)
nUS
# }
Run the code above in your browser using DataLab