new_set: Create new MALECOT parameter set

Description Usage Arguments Details Examples

Description

TODO

Usage

1
2
3
4
5
new_set(project, name = "(no name)", lambda = 1,
  COI_model = "poisson", COI_max = 20, COI_manual = NULL,
  estimate_COI_mean = TRUE, COI_mean = 3, COI_dispersion = 2,
  estimate_error = FALSE, e1 = 0, e2 = 0, e1_max = 0.2,
  e2_max = 0.2)

Arguments

project

a MALECOT project, as produced by the function malecot_project()

name

the name of the parameter set

lambda

the shape parameter(s) of the prior on allele frequencies. This prior is Beta in the bi-allelic case, and Dirichlet in the multi-allelic case. lambda can be:

  • a single scalar value, in which case the same value is used for every allele and every locus (i.e. the prior is symmetric)

  • a vector of values, in which case the same vector is used for every locus. Only works if the same number of alleles applies at every locus

  • a list of vectors specifying the shape parameter separately for each allele of each locus. The list must of length L, and must contain vectors of length equal to the number of alleles at that locus

COI_model

the type of prior on COI. Must be one of "uniform", "poisson", or "nb" (negative binomial)

COI_max

the maximum COI allowed for any given sample

COI_manual

A vector of length n (where n is the number of samples) allowing the COI to be specified manually. Positive values indicate fixed COIs that should not be updated as part of the MCMC, while -1 values indicate that COIs should be estimated. Defaults to rep(-1,n), meaning all COIs will be esimated

estimate_COI_mean

whether the mean COI should be estimated for each subpopulation as part of the MCMC, otherwise the value COI_mean is used for all subpopulations. Defaults to TRUE. Note that mean COI estimation is only possible under the Poisson and negative binomial models (see COI_model)

COI_mean

single scalar value specifying the mean COI for all subpopulations (see estimate_COI_mean above)

COI_dispersion

the ratio of the variance to the mean of the prior on COI. Only applies under the negative binomial model. Must be >1, as a ratio of 1 can be achieved by using the Poisson distribution

estimate_error

whether to estimate error probabilities e1 and e2

e1

the probability of a true homozygote being incorrectly called as a heterozygote

e2

the probability of a true heterozygote being incorrectly called as a homozygote

e1_max

the maximum possible value of e1

e2_max

the maximum possible value of e2

Details

TODO

Examples

1
# TODO

bobverity/MALECOT documentation built on May 13, 2019, 4:01 a.m.