hap_err_sim: Simulation of estimated haplotype frequencies with some...

View source: R/hap_err_sim.R

hap_err_simR Documentation

Simulation of estimated haplotype frequencies with some sample size

Description

Noisy estimated haplotype frequencies are simulated assuming multinomial distribution with some sample size.

Usage

hap_err_sim(freq, samsize)

Arguments

freq

Numeric matrix, with each i,j element being the frequency of haplotype i at sequenced time point j.

samsize

Numeric vector or numeric. If numeric vector, a samplesize vector the same length as the ncol(freq). If numeric, the mean sample size, a poisson distribution will be used to determine the samplesize at different timepoints.

Value

A list, with the first item being the noisy frequency matrix, the second item the samplesize matrix.

See Also

haplotest()


xthchen/haplotest documentation built on Nov. 29, 2022, 12:07 p.m.