Skip to contents

A function to generate the likelihood of a specific COI value.

Usage

likelihood(coi, processed_data, distance = "squared", coi_method = "variant")

Arguments

coi

The COI for which the likelihood will be generated.

processed_data

The processed COI data. This is the output of process_sim() or process_real().

distance

[Deprecated] This argument is no longer supported; this function will solve a weighted least squares minimization problem.

coi_method

The method we will use to generate the theoretical relationship. The method is either "variant" or "frequency". The default value is "variant".

Value

The likelihood for a specific COI value.

Details

The likelihood can be thought of the distance between two curves: the "real" COI curve, generated from the inputted data, and the "simulated" COI curve, which depends on the COI value specified. There are three different methods implemented to compute the distance between two curves:

  • abs_sum: Absolute value of sum of difference.

  • sum_abs: Sum of absolute difference.

  • squared: Sum of squared difference.

See also

Other optimization functions: optimize_coi_regression(), optimize_coi()