Learn R Programming

AlphaSimR (version 0.10.0)

setEBV: Set EBV

Description

Sets a population's EBV with genomic estimated values from RRBLUP, RRBLUP_GCA, or RRBLUP_SCA.

Usage

setEBV(pop, solution, gender = NULL, useGV = FALSE, append = FALSE,
  simParam = NULL)

Arguments

pop

an object of Pop-class

solution
gender

either NULL, "male" or "female". If solution is GCAsol-class or SCAsol-class the EBV is the GCA if used in the corresponding pool

useGV

if model is RRDsol-class, setting this parameter to TRUE will give use estimated genetic values. Otherwise, you get estimated breeding values that depend on the population's allele frequency.

append

should EBVs be appended to existing EBVs

simParam

an object of SimParam

Value

Returns an object of Pop-class

Examples

Run this code
# NOT RUN {
#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))

# }

Run the code above in your browser using DataLab