# Compute the p-value corresponding to a likelihood ratio.

### Description

Computes the likelihood ratio for the given hypotheses and finally calculates a p-value corresponding to the likelihood ratio. The p-value is the probability of observing a likelihood ratio at least as large as the one observed, given that the defense hypothesis is true.

### Usage

1 |

### Arguments

`sampleData` |
Data frame or matrix with sample profile. Each column represent an allele, each row represent a marker. Only autosomal markers. Marker names that correspond with markers in allele frequency database must be given as row names. |

`victimData` |
Data frame or matrix with victim profile. Each column represent an allele, each row represent a marker. Only autosomal markers. Markers must be in the same order as for sampleData. |

`suspectData` |
Data frame or matrix with suspect profile. Each column represent an allele, each row represent a marker. Only autosomal markers. Markers must be in the same order as for victimData and sampleData. |

`db` |
Data frame with allele frequencies. Data for the various markers are stacked. First column contains marker names, each name repeated as many times as there are alleles for the marker. Second column contains the allele names and third column contains the frequencies. |

`hp` |
Prosecution hypothesis. A character vector of all contributors under $H_p$, where S denotes suspect, V victim and U unknown. E.g. if the hypothesis is that the sample is a mixture of the suspect, the victim and one unknown, this is specified with the vector c('S','V,'U'). |

`hd` |
Defense hypothesis. A character vector of all contributors under $H_d$, specified like hp. E.g. if the hypothesis is that the sample is a mixture of the suspect, and two unknowns, this is specified with the vector c('S','U,'U'). |

`prD` |
Probability of drop-out. A number between 0 and 1. |

`prC` |
Probability of drop-in. A number between 0 and 1. |

### Details

The function is a wrapper for pvalue.machine. Likelihood ratios are computed with the LR function in forensim. Use pvalue.machine for a more generic function that is independent of LR model.

### Value

`LR` |
Likelihood ratio |

`pvalue` |
P-value corresponding to the likelihood ratio |

### Author(s)

Guro Dorum <guro.dorum@nmbu.no>

### References

Dorum et al. Exact computation of the distribution of likelihood ratios with forensic applications. FSI: Genetics, 9, 2014, doi: http://dx.doi.org/10.1016/j.fsigen.2013.11.008

### See Also

`pvalue.machine,LRpvalue`

### Examples

1 2 3 |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.