Compute COI based on all points fitted to best fitting curve for COI
Source:R/regression.R
optimize_coi_regression.Rd
Compute COI based on all points fitted to best fitting curve for COI
Usage
optimize_coi_regression(
data,
data_type,
max_coi = 25,
seq_error = 0.01,
distance = "squared",
coi_method = "variant",
seq_error_bin_size = 20
)
Arguments
- data
The data for which the COI will be computed.
- data_type
The type of the data to be analyzed. One of
"sim"
or"real"
.- max_coi
A number indicating the maximum COI to compare the simulated data to.
- seq_error
The level of sequencing error that is assumed. If no value is inputted, then we infer the level of sequence error.
- distance
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".
- seq_error_bin_size
Number of loci in smallest bin for estimating sequence error
See also
stats::optim()
for the complete documentation on the optimization
function.
Other optimization functions:
likelihood()
,
optimize_coi()