candes: Candidate Description

candesR Documentation

Candidate Description

Description

An R-Object is created containing all information describing the individuals, which is usually a sample from the current population and includes the selection candidates. Average kinships and trait values, and the available objective functions and constraints for optimum contribution selection (OCS) are reported.

Usage

candes(phen,  cont=NULL, N=1000, quiet=FALSE, t=NA, bc=NULL, reduce.data=TRUE, ...)

Arguments

phen

Data frame with column Indiv containing animal IDs and possibly Sex containng sexes, coded as 'male' and 'female', or NA if sexes are to be ignored. It also contains column Born with year of birth if generations are assumed to be overlapping. The other columns may contain traits, e.g. breeding values or native contributions, column Breed with breed names for multi-breed evaluations, logical column isCandidate indicating the selection candidates, and columns Sire and Dam with IDs of sires and dams.

cont

Data frame frame with column age (equal to the row number), and columns male, and female, containing the contributions of males and females from each age class to the population. It is usually created with function agecont. The default means that non-overlapping generations are assumed, so there is only one age class for males and one for females.

N

The population size. A small value accelerates the increase in kinship due to genetic drift. For overlapping generations it can be calculated as N=N0/r0, where N0 is the number of individuals born each year, and r0<=1 is the percentage which this age class represents in the population. The default is N=1000.

quiet

Should the report be suppressed?

t

The time at which the population should be evaluated. The default means that t=max(floor(phen$Born)).

bc

Only needed if multi-breed data is provided. Named vector with breed contributions, with component names being the names of the breeds in phen. It contains the proportion of each breed to a hypothetical multi-breed population for which the diversity across breeds should be managed. Alternatively, bc can be a character string containig the name of a kinship. In this case, optimum contributions of the breeds are determined automatically so that the mean kinship across breeds is minimized.

reduce.data

Logical. Should data from individuals not contributing to the population at time t be removed from the output?

...

One or more objects of class 'matrix', 'quadFun', or 'ratioFun' defining the pairwise kinships and native kinships of individuals.

Details

An R-Object is created containing all information describing the individuals, which is usually the current population and includes the selection candidates. Average kinships and trait values are estimated and reported. The weights of Age x Sex classes are in accordance with argument cont. The available objective functions and constraints for optimum contribution selection are reported.

Value

List of class candes with the following components:

kinship

Objects of class 'quadFun', or 'ratioFun', one for each additional parameter. These objects define the functions needed to estimate the mean kinships and mean native kinships in the next year or generation.

phen

Supplied data frame phen containing phenotypes, individual IDs, and some appended columns that are needed for OCS. These are

* Column Age with the ages of the individuals,

* Column Class with the Breed x Age x Sex or Breed x Age classes to which the individuals belong.

* Column c0 containing the contribution each individual itself has to the current population.

* Column c1 containing the contribution each individual itself has to the population in the next year (for overlapping generations) or to the next generation (for non-overlapping generations). In the latter case, c1 contains zeros.

* Column isCandidate indicating the selection candidates.

mean

Data frame containing estimates of the current mean values (at time t) of the parameters in a population consisting of N individuals for which the individuals in argument phen are representative.

current

Data frame containing the same values as component mean, but also some additional information on the parameters.

bc

Character vector with optimum breed contributions (see above).

classes

Data frame containing the number of individuals in each class (column n), the contribution of each class to the population in this year/generation (column rcont0) and in the next year/generation (column rcont1), and the expected proportion of offspring animals from a given sex have at a particular age.

breed

List describing the breeds included in the data set.

Author(s)

Robin Wellmann

Examples

data(PedigWithErrors)

Pedig      <- prePed(PedigWithErrors, thisBreed="Hinterwaelder", lastNative=1970, 
                   keep=PedigWithErrors$Born%in%1992)
use        <- Pedig$Born %in% (1980:1990) & Pedig$Breed=="Hinterwaelder"
Population <- Pedig$Indiv[use]

Pedig$NC   <- pedBreedComp(Pedig, thisBreed="Hinterwaelder")$native
pKin       <- pedIBD(Pedig, keep.only=Population)
pKinatN    <- pedIBDatN(Pedig, thisBreed="Hinterwaelder",  keep.only=Population)
Phen       <- Pedig[Population, ]

### Example 1: Overlapping Generations
### Old individuals contribute only little to the means:

cont <- agecont(Pedig, Population, maxAge=10)
cand <- candes(phen=Phen, pKin=pKin, pKinatN=pKinatN, cont=cont)

cand$current[,c("Name", "Type", "Breed", "Val", "Var")]
#     Name      Type         Breed         Val     Var
#1      BV     trait Hinterwaelder -0.55979308      BV
#2      NC     trait Hinterwaelder  0.56695077      NC
#3    pKin   kinship Hinterwaelder  0.02230896    pKin
#4 pKinatN nat. kin. Hinterwaelder  0.04678453 pKinatN

# BV:      simulated breeding values
# NC:      native genetic contribution computed from pedigree
# pKin:    pedigree-based kinship
# pKinatN: pedigree-based native kinship


### Example 2: Discrete Generations (cont=NULL). 
### Old individuals and young individuals contribute equally to the means:

Phen$Born <- 1
cand <- candes(phen=Phen, pKin=pKin, pKinatN=pKinatN, cont=NULL)

cand$current[,c("Name", "Type", "Breed", "Val", "Var")]

#     Name      Type         Breed         Val     Var
#1      BV     trait Hinterwaelder -0.71910508      BV
#2      NC     trait Hinterwaelder  0.58226604      NC
#3    pKin   kinship Hinterwaelder  0.01979228    pKin
#4 pKinatN nat. kin. Hinterwaelder  0.04053012 pKinatN


### Shorthand:

cand$mean
#          BV       NC       pKin    pKinatN
#1 -0.7191051 0.582266 0.01979228 0.04053012

cand$mean$pKin
#[1] 0.01979228


optiSel documentation built on May 31, 2023, 6:50 p.m.