replicate_likelihood: gamma-Poisson log likelihood for replicates

Description Usage Arguments Details Examples

Description

The gamma-Poisson likelihood (which has parameters C, η) for a sample of frequency count tables drawn from the same population.

Usage

1
replicate_likelihood(x, ccc, cc_list, ks_list, fs_list, penalty, lambda)

Arguments

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 ks_list.

penalty

The penalty function form to use, only "h1" is supported currently.

lambda

The penalization parameter.

Details

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.

Examples

1
2
list_of_fct <- rre::nb_fct_simulation(1000, 0.1, 0.1, 2) # two replicates
direct_optimise_replicates(list_of_fct)

statdivlab/rre documentation built on Nov. 5, 2019, 9:20 a.m.