CalcBYprobs {sequoia} | R Documentation |
Birth year probabilities
Description
Estimate the probability that an individual with unknown birth
year is born in year y
, based on BirthYears
or BY.min
and/or BY.max
of its parents, offspring, and siblings, combined with
AgePrior
(the age distribution of other parent-offspring pairs),
and/or Year.last
of its parents.
Usage
CalcBYprobs(Pedigree = NULL, LifeHistData = NULL, AgePrior = NULL)
Arguments
Pedigree |
dataframe with columns id-dam-sire. |
LifeHistData |
data.frame with up to 6 columns:
"Birth year" may be in any arbitrary discrete time unit relevant to the species (day, month, decade), as long as parents are never born in the same time unit as their offspring, and only integers are used. Individuals do not need to be in the same order as in ‘GenoM’, nor do all genotyped individuals need to be included. |
AgePrior |
a matrix with probability ratios for individuals with age
difference A to have relationship R, as generated by
|
Details
This function assists in estimating birth years of individuals for which these are unknown, provided they have at least one parent or one offspring in the pedigree. It is not a substitute for field-based estimates of age, only a method to summarise the pedigree + birth year based information.
Value
A matrix with for each individual (rows) in the pedigree that has a missing
birth year in LifeHistData
, or that is not included in
LifeHistData
, the probability that it is born in y
(columns).
Probabilities are rounded to 3 decimal points and may therefore not sum
exactly to 1.
WARNING
Any errors in the pedigree or lifehistory data will cause errors in the birth year probabilities of their parents and offspring, and putatively also of more distant ancestors and descendants. If the ageprior is based on the same erroneous pedigree and lifehistory data, all birth year probabilities will be affected.
See Also
MakeAgePrior
to estimate effect of age on
relationships.
Examples
BYprobs <- CalcBYprobs(Pedigree = SeqOUT_griffin$Pedigree,
LifeHistData = SeqOUT_griffin$LifeHist)
## Not run:
# heatmap
lattice::levelplot(t(BYprobs), aspect="fill", col.regions=hcl.colors)
## End(Not run)