setEBV {AlphaSimR} | R Documentation |
Sets a population's EBV with genomic estimated
values from RRBLUP
, RRBLUP_GCA
,
or RRBLUP_SCA
.
setEBV(pop, solution, gender = NULL, useGV = FALSE, append = FALSE, simParam = NULL)
pop |
an object of |
solution |
an object of |
gender |
either NULL, "male" or "female". If
solution is |
useGV |
if model is |
append |
should EBVs be appended to existing EBVs |
simParam |
an object of |
Returns an object of Pop-class
#Create founder haplotypes founderPop = quickHaplo(nInd=10, nChr=1, segSites=10) #Set simulation parameters SP = SimParam$new(founderPop) SP$addTraitA(10) SP$setVarE(h2=0.5) SP$addSnpChip(10) #Create population pop = newPop(founderPop, simParam=SP) #Run GS model and set EBV ans = RRBLUP(pop, simParam=SP) pop = setEBV(pop, ans, simParam=SP) #Evaluate accuracy cor(gv(pop), ebv(pop))