Learn R Programming

euroMix (version 1.1.1)

pvalue.machine: Computes the p-value for LR.suspect

Description

It is difficult to obtain accurate p-values based on simulation. This function provides an exact alternative.

Usage

pvalue.machine(LR.suspect, LR.table, P.table)

Arguments

LR.suspect
Numeric. Observed likeliood ratio (1x1 positive value)
LR.table
Pre-computed likelihood ratios for every genotype of every marker (MxG matrix). Each row corresponds to a marker. G is the maximum number of genotypes for any marker. Markers with fewer than G genotypes must have 0 in redundant columns
P.table
The population probabilities for every genotype of every marker (MxG matrix). Must corresponds to the genotypes in LR.table. See description of LR.table

Value

The p-value, where a value close to 0 indicates that the suspect is a contributor.

See Also

The function is obsolete.

See dists.product and dists.product.pair for efficient computation of likelihood ratio distributions.

Examples

Run this code
#Simple example, 2 markers, 3 genotypes. LR's and genotype probabilities precalculated
#The LR's for all possible genotypes for both markers. Each row corresponds to a marker
LR.table <- matrix(c(6,5,5,4,3,2),2,3)
#The population probabilities corresponding to the genotypes in LR.table
P.table <- rbind(c(0.2, 0.4, 0.4), c(0.1,0.6,0.3))
#LR observed for suspect
LR.suspect <- 20
pvalue <- pvalue.machine(LR.suspect, LR.table, P.table)
cat("p-value = ", pvalue, "\n")












  
  
  
  
  
  
  
            






  
  
  
  
  
  
  
  
    
    
    
    
    
                
    
  
  
  
  
  






Run the code above in your browser using DataLab