Skip to contents

A function to compute the COI of inputted data.

Usage

optimize_coi(
  data,
  data_type,
  max_coi = 25,
  seq_error = 0.01,
  bin_size = 20,
  distance = "squared",
  coi_method = "variant",
  use_bins = FALSE
)

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.

bin_size

[Deprecated] This argument is no longer supported; to estimate the COI, all data points are used. Data points are not grouped in bins of changing plaf.

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

use_bins

[Deprecated] This argument is no longer supported; to estimate the COI, all data points are used. Data points are not grouped in bins of changing plaf.

Value

The predicted COI value.

Details

The function utilizes stats::optim(). In particular, the function utilizes a quasi-Newton method to compute gradients and build a picture of the surface to be optimized. The function uses a likelihood function as defined by likelihood().

See also

stats::optim() for the complete documentation on the optimization function.

Other optimization functions: likelihood(), optimize_coi_regression()