# \donttest{
## load example data from hypred package
data(hybrid_phe)
data(input_geno)
## convert original genotype
inbred_gen <- convertgen(input_geno, type = "hmp2")
## infer the additive and dominance genotypes of hybrids
gena <- infergen(inbred_gen, hybrid_phe)$add
gend <- infergen(inbred_gen, hybrid_phe)$dom
## calculate the additive and dominance kinship matrix
ka <- kin(gena)
kd <- kin(gend)
##for the additive model
predictability <- cv_fast(y = hybrid_phe[,3], kk = list(ka))
##for the additive-dominance model
predictability <- cv_fast(y = hybrid_phe[,3], kk = list(ka,kd))
# }
Run the code above in your browser using DataLab