reordXlist | R Documentation |
Reorders design matrices so excluded parents appear last, and high probability parents appear first, thus increasing computational efficiency.
reordXlist(X.list, marker.type="MSW")
X.list |
list of design matrices for each offspring derived using |
marker.type |
|
The design matrices are reordered by the number of mismatches between a parent and offspring for codominant markers, and by the probability of the offspring genotype conditional on parent genotype for dominant markers.
X.list
for which parents are reordered
If a GdataPed
object is passed to getXlist
then the design matrices will be reordered by default.
Jarrod Hadfield j.hadfield@ed.ac.uk
MCMCped
## Not run: data(WarblerG) A<-extractA(WarblerG) ped<-matrix(NA, 5,3) ped[,1]<-1:5 ped[,2]<-c(rep(NA, 4), 3) ped[,3]<-c(rep(NA, 4), 4) genotypes<-simgenotypes(A, ped=ped) sex<-c("Female", "Male", "Female", "Male","Female") offspring<-c(0,0,0,0,1) data<-data.frame(id=ped[,1], sex, offspring) var1<-expression(varPed(x="offspring", restrict=0)) PdP<-PdataPed(formula=list(var1), data=data) X.list<-getXlist(PdP) # creates design matrices for offspring (in this case indivdiual "5") X.list<-mismatches(X.list, G=genotypes$Gobs) X.list<-fillX.G(X.list, A=A, G=genotypes$Gobs) X.list.reord<-reordXlist(X.list) # The design matrices for the genetic likelihoods are reordered # by the number of mismatches. The true parental combination # now appears first rather than last. X.list$X$"5"$G X.list.reord$X$"5"$G ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.