bayes {DATRAS} | R Documentation |
Calculate conditional expectation of some function of length given age.
bayes(pal, pl, fl)
pal |
matrix with age-length key, i.e. p(A|L). Columns correspond to age groups. |
pl |
vector with length distribution, i.e. p(L). |
fl |
vector of function values at length, i.e. f(L). |
Find E(f(L)|A) in terms of p(L), p(A|L) and f(L), using Bayes formula.
vector of expectations