data(miscEx)
# recode the pedigree for later use
pedR<- pedRecode(pedF8)
# impute missing genotypes
gdatTmp<- genoImpute(gdatF8, gmap=gmapF8, step=Inf,
gr=8, na.str=NA)
# estimate variance components
o<- estVC(y=pdatF8$bwt, x=pdatF8$sex, v=list(AA=gmF8$AA,DD=gmF8$DD,
HH=NULL, AD=NULL, MH=NULL, EE=diag(length(pdatF8$bwt))))
# scan marker loci & permutation
ex1<- nullSim(y=pdatF8$bwt, x=pdatF8$sex, gdat=gdatTmp,
method="permutation", vc=o, ntimes=10)
dim(ex1)
# scan marker loci & gene dropping
ex2<- nullSim(y=pdatF8$bwt, x=pdatF8$sex, gdat=gdatTmp, ped=pedR,
gmap=gmapF8, method="gene", vc=o, ntimes=10)
dim(ex2)
# Haley-Knott method & permutation
gdtmp<- gdatF8
gdtmp<- replace(gdtmp,is.na(gdtmp),0)
prDat<- genoProb(gdat=gdtmp, gmap=gmapF8, step=Inf,
gr=8, method="Haldane", verbose=TRUE)
ex3<- nullSim(y=pdatF8$bwt, x=pdatF8$sex, prdat=prDat,
method="permutation", vc=o, ntimes=10)
dim(ex3)
# Haley-Knott method & gene dropping
ex4<- nullSim(y=pdatF8$bwt, x=pdatF8$sex, prdat=prDat, ped=pedR,
gmap=gmapF8, method="gene", vc=o, gr=8, ntimes=10)
dim(ex4)Run the code above in your browser using DataLab