Learn R Programming

updog (version 1.1.3)

flex_update_pivec: Update the distribution of genotypes from various models.

Description

Update the distribution of genotypes from various models.

Usage

flex_update_pivec(
  weight_vec,
  model = c("hw", "bb", "norm", "ash", "f1", "s1", "f1pp", "s1pp", "f1ppdr", "s1ppdr",
    "flex", "uniform", "custom"),
  control
)

Arguments

weight_vec

colSums(wik_mat) from flexdog. This is the sum of current posterior probabilities of each individual having genotype k.

model

What model are we assuming? See the description in flexdog for details.

control

A list of anything else needed to be passed. E.g. if model = "ash", then inner_weights needs to be passed through control (see get_inner_weights for how to get this matrix).

Value

A list with the following elements

pivec

The estimate of the genotype distribution.

par

A list of estimated parameters. An empty list if the model does not contain any parameters other than pivec.