Learn R Programming

rhierbaps (version 1.1.4)

move_units_1: move_units_1

Description

Peform an iteration of the first move in the algorithm. That is move units from one cluster to another to improve the marginal likelihood

Usage

move_units_1(
  snp.object,
  partition,
  threshold = 1e-05,
  frac.clust.searched = 0.3,
  min.clust.size = 20,
  n.cores = 1
)

Value

The best partition after moving units from one cluster to another as well as a boolean value indicating whether a move increased the marginal likelihood.

Arguments

snp.object

A snp.object containing the processed SNP data.

partition

An integer vector indicating an initial partition of the isolates.

threshold

The increase in marginal log likelihood required to accept a move.

frac.clust.searched

The percentage of a large cluster that will be moved.

min.clust.size

All isolates in clusters less than or equal to min.clus.size will be searched.

n.cores

The number of cores to use.