Learn R Programming

forensim (version 2.0)

simumix constructor: simumix constructor

Description

Constructor for simumix objects. The function simumix creates a simumix object from a tabfreq object. The function as.simumix is an alias for simumix function. is.simumix tests if an object is a valid simumix object. Note: to get the manpage about simumix, please type 'class ? simumix'.

Usage

simumix(tab,which.loc=NULL,ncontri=1)
as.simumix(tab,which.loc=NULL,ncontri=1)
is.simumix(x)

Arguments

tab
a simugeno object created with constructor simugeno
which.loc
a character vector giving the chosen loci for the genotypes simulation. The default is set to NULL, which corresponds to all the loci of the simugeno object given in argument
ncontri
integer vector giving the number of individuals. If there are several populations, ncontri gives the numbers of individuals to simulate per population. Default is one.
x
an object

Value

  • For simumix and as.simumix, a simumix object. For is.simumix, a logical.

encoding

UTF-8

Details

DNA mixtures are created by randomly drawing individual genotypes with a uniform probability. If there are N individuals in the sample (the simugeno object), then each individual has a probability of 1/N to be selected.

See Also

"simumix", simugeno for creating a simugeno object.

Examples

Run this code
data(Tu)
tab<-simugeno(tabfreq(Tu),n=1200)
#simulation of a 3-person mixture characterized with markers FGA, TH01 and TPOX 
simumix(tab,which.loc=c('FGA','TH01', 'TPOX') , n =3)

Run the code above in your browser using DataLab