Learn R Programming

AlphaSimR (version 0.11.1)

RRBLUP_GCA: RR-BLUP GCA Model

Description

Fits an RR-BLUP model that estimates seperate marker effects for females and males. Useful for predicting GCA of parents in single cross hybrids. Can also predict performance of specific single cross hybrids.

Usage

RRBLUP_GCA(
  pop,
  traits = 1,
  use = "pheno",
  snpChip = 1,
  useQtl = FALSE,
  maxIter = 40L,
  useReps = FALSE,
  simParam = NULL,
  ...
)

Arguments

pop

a Pop-class to serve as the training population

traits

an integer indicating the trait to model, or a function of the traits returning a single value.

use

train model using phenotypes "pheno", genetic values "gv", estimated breeding values "ebv", breeding values "bv", or randomly "rand"

snpChip

an integer indicating which SNP chip genotype to use

useQtl

should QTL genotypes be used instead of a SNP chip. If TRUE, snpChip specifies which trait's QTL to use, and thus these QTL may not match the QTL underlying the phenotype supplied in traits.

maxIter

maximum number of iterations for convergence.

useReps

should population's reps slot be used to model heterogeneous error variance

simParam

an object of SimParam

...

additional arguments if using a function for traits

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_GCA(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