Learn R Programming

updog (version 1.1.3)

initialize_pivec: Initialize pivec for flexdog EM algorithm.

Description

The key idea here is choosing the pi's so that the two modes have equal probability.

Usage

initialize_pivec(
  ploidy,
  mode,
  model = c("hw", "bb", "norm", "ash", "f1", "s1", "f1pp", "s1pp", "f1ppdr", "s1ppdr",
    "flex", "uniform", "custom")
)

Arguments

ploidy

The ploidy of the species. Assumed to be the same for each individual.

mode

The mode if model = "ash". If not provided, flexdog will estimate the mode. This is the starting point of the allele frequency if model = "hw". This should be NULL for all other options of model.

model

What form should the prior (genotype distribution) take? See Details for possible values.

Value

A vector of numerics. The initial value of pivec used in flexdog_full.

See Also

flexdog for where this is used.