fill_fertility
returns the expected value of the fertility
matrix combining observed recruits for one time step and a Gamma prior for each column.
fill_fertility(TF, N, alpha = 1e-05, beta = 1e-05, priorweight = -1, returnType = "F")
TF | A list of two matrices, T and F, as ouput by |
---|---|
N | A vector of observed stage distribution. |
alpha | A matrix of the prior parameter for each stage. Impossible stage combinations marked with NA_real_. |
beta | A matrix of the prior parameter for each stage. Impossible stage combinations marked with NA_real_. |
priorweight | total weight for each column of prior as a percentage of sample size or 1 if negative |
returnType | A character vector describing the desired return value. Defaults to "F" the fertility matrix |
The return value depends on parameter returnType.
A - the summed matrix "filled in" using a Gamma prior
F - just the filled in fertility matrix
ab - the posterior parameters alpha and beta as a list.
Assumes that only one stage reproduces ... needs generalizing.