candes | R Documentation |
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.
candes(phen, cont=NULL, N=1000, quiet=FALSE, t=NA, bc=NULL, reduce.data=TRUE, ...)
phen |
Data frame with column |
cont |
Data frame frame with column |
N |
The population size. A small value accelerates the increase in kinship due to genetic drift. For overlapping generations it can be calculated as |
quiet |
Should the report be suppressed? |
t |
The time at which the population should be evaluated. The default means that |
bc |
Only needed if multi-breed data is provided. Named vector with breed contributions, with component names being the names of the breeds in |
reduce.data |
Logical. Should data from individuals not contributing to the population at time |
... |
One or more objects of class |
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.
List of class candes with the following components:
kinship |
Objects of class |
phen |
Supplied data frame * Column * Column * Column * Column * Column |
mean |
Data frame containing estimates of the current mean values (at time |
current |
Data frame containing the same values as component |
bc |
Character vector with optimum breed contributions (see above). |
classes |
Data frame containing the number of individuals in each class (column |
breed |
List describing the breeds included in the data set. |
Robin Wellmann
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.