Learn R Programming

likeLTD (version 6.3.0)

create.likelihood.vectors: likeLTD::create.likelihood.vectors

Description

Creates an objective function

Usage

create.likelihood.vectors(hypothesis, addAttr=FALSE, likeMatrix=FALSE, …)

Arguments

hypothesis

Hypothesis for which to create the objective function

addAttr

Whether to add attributes to the objective functions. There are two attributes: (1) “hypothesis” referencing the input hypothesis, (ii) ‘functions’ containing the individual objective functions per Locus. The latter contain further attributes.

likeMatrix

Whether to return likelihoods for every genotype combination, or a likelihood summed over all genotypes after optimisation. Set to TRUE for individual genotype likelihoods. This is used for get.likely.genotypes.

Any named parameter to modify the hypothesis, e.g. nUnknowns

Value

A function

Details

The objective function is created from the hypothesis. Itself, it takes as arguments the nuisance parameters and, optionally, the parameters for the penalty function. This particular flavor of the objective returns a list containing two items: (i) the likelihoods per locus, (ii) the penalties per locus.

See Also

create.likelihood, create.likelihood.log, get.likely.genotypes, penalties, Objective Functions