Description Usage Arguments Details Examples
The gamma-Poisson likelihood (which has parameters C, η) for a sample of frequency count tables drawn from the same population.
1 | replicate_likelihood(x, ccc, cc_list, ks_list, fs_list, penalty, lambda)
|
x |
a length 2 vector, eta = (α, δ). |
ccc |
The value of C to evaluate the likelihood at. |
cc_list |
A list, each item is a length 1 numeric vector stating the observed richness for each replicate. |
ks_list |
A list, each list item is a vector for that replicate. The vector represents the k values for the nonzero frequencies. |
fs_list |
A list, each list item is a vector for that replicate. The
vector represents the frequencies f_k associated with the k
values in |
penalty |
The penalty function form to use, only "h1" is supported currently. |
lambda |
The penalization parameter. |
The paramaters cc_list
, ks_list
, fs_list
are a
formatted version of the frequency count table list. The likelihood
function is called many times as we optimise, so we require them to be
formatted this way to save time in the long run. This function uses RCPP
to speed up the unavoidable factorial calculations in the likelihood.
1 2 | list_of_fct <- rre::nb_fct_simulation(1000, 0.1, 0.1, 2) # two replicates
direct_optimise_replicates(list_of_fct)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.