locus.likes: likeLTD::locus.likes

Description Usage Arguments Details Value See Also Examples

View source: R/reports.R

Description

Vector with individual locus likelihoods.

Usage

1
locus.likes(hypothesis,results,...)

Arguments

hypothesis

The hypothesis generated by either prosecution.hypothesis or defence.hypothesis.

results

Either prosecution or defence results from evaluate e.g. results$Pros or results$Def.

...

Any extra parameter that was passed to evaluate or optimisation.params.

Details

Convert the overall likelihood returned by DEoptim into locus specific likelihoods.

Value

Vector.

See Also

evaluate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## Not run: 
# datapath to example files
datapath = file.path(system.file("extdata", package="likeLTD"),"hammer")

# File paths and case name for allele report
admin = pack.admin.input(
            cspFile = file.path(datapath, 'hammer-CSP.csv'),
            refFile = file.path(datapath, 'hammer-reference.csv'),
            caseName = "hammer",
	    kit= "SGMplus"
             )

# Enter arguments
args = list(
        nUnknowns = 1,
        doDropin = FALSE,
        ethnic = "EA1",
        adj = 1,
        fst = 0.02,
        relatedness = c(0,0)
        )

# Create hypotheses
hypP = do.call(prosecution.hypothesis, append(admin,args))
hypD = do.call(defence.hypothesis, append(admin,args))

# Get parameters for optimisation
paramsP = optimisation.params(hypP)
paramsD = optimisation.params(hypD)

# Run optimisation
# n.steps set for demonstration purposes
results = evaluate(paramsP, paramsD, n.steps=1)

# get locus likelihoods under prosecution
locus.likes(hypP,results$Pros)

# get locus LRs
locus.likes(hypP,results$Pros)/locus.likes.peaks(hypD,results$Def)

## End(Not run)

likeLTD documentation built on May 1, 2019, 7:58 p.m.