contLikSearch: contLikSearch

View source: R/contLikSearch.R

contLikSearchR Documentation

contLikSearch

Description

contLikSearch search through the models which optimizes the likelihood function

Usage

contLikSearch(
  NOC = 2:3,
  modelDegrad = FALSE,
  modelBWstutt = FALSE,
  modelFWstutt = FALSE,
  samples = NULL,
  popFreq = NULL,
  refData = NULL,
  condOrder = NULL,
  knownRefPOI = NULL,
  prC = 0,
  nDone = 2,
  threshT = 50,
  fst = 0,
  lambda = 0,
  delta = 1,
  kit = NULL,
  verbose = TRUE,
  difftol = 0.01,
  knownRel = NULL,
  ibd = c(1, 0, 0),
  minF = NULL,
  normalize = TRUE,
  priorBWS = NULL,
  priorFWS = NULL,
  seed = NULL,
  maxThreads = 0,
  alpha = 0.01,
  steptol = 0.001,
  adjQbp = FALSE
)

Arguments

NOC

#The vector of number of contributors to search

modelDegrad

Whether degradation should be modeled (requires kit to be specified): can be vector (FALSE,TRUE)

modelBWstutt

Whether backward stutter should be modeled: can be vector (FALSE,TRUE)

modelFWstutt

Whether forward stutter should be modeled: can be vector (FALSE,TRUE)

samples

A List with samples which for each samples has locus-list elements with list elements adata and hdata. 'adata' is a qualitative (allele) data vector and 'hdata' is a quantitative (peak heights) data vector.

popFreq

A list of allele frequencies for a given population.

refData

Reference objects with (2-size) allele-vector given in list element [[i]][[s]].

condOrder

condOrder under Hd. See calcMLE function for more details.

knownRefPOI

Specify index of known POI under Hp (can only be one number)

prC

A numeric for allele drop-in probability. Default is 0.

nDone

Number of optimizations required providing equivalent results (same logLik value obtained)

threshT

The detection threshold given. Used when considering probability of allele drop-outs.

fst

The co-ancestry coefficient. Default is 0.

lambda

Parameter in modeled peak height shifted exponential model. Default is 0.

delta

Scaling of variation of normal distribution when drawing random startpoints. Default is 1.

kit

Used to model degradation. Must be one of the shortnames of kit: check getKit()

verbose

Whether printing optimization progress. Default is TRUE.

difftol

Tolerance for being exact in log-likelihood value (relevant when nDone>1)

knownRel

gives the index of the reference which the 1st unknown is related to.

ibd

the identical by decent coefficients of the relationship (specifies the type of relationship)

minF

The freq value included for new alleles (new alleles as potential stutters will have 0). Default NULL is using min.observed in popFreq.

normalize

Whether normalization should be applied or not. Default is FALSE.

priorBWS

Prior function for BWS-parameter. Flat prior on [0,1] is default.

priorFWS

Prior function for FWS-parameter. Flat prior on [0,1] is default.

seed

The user can set seed if wanted

maxThreads

Maximum number of threads to be executed by the parallelization

alpha

The significance level used for the envelope test (validMLEmodel). Default is 0.01

steptol

Argument used in the nlm function for faster return from the optimization (tradeoff is lower accuracy).

adjQbp

Indicate whether fragmenth length of Q-allele is based on averaged weighted with frequencies

Value

A list with fitted models, and table results for the defined model outcome

Author(s)

Oyvind Bleka


oyvble/euroformix documentation built on Aug. 25, 2023, 11:14 a.m.