# NOT RUN {
# }
# NOT RUN {
## Simulate some allele frequencies:
freqs <- replicate(10, { g = rgamma(n=10,scale=4,shape=3); g/sum(g)}, simplify=FALSE)
## List of elements needed to compute the covariance matrix.
## Useful option when the covariance needs to be computed for varying
## database sizes but for identical theta-value.
comps <- dbVariance(freqs,theta=0,n=1)
## Covariance for a DB with 1000 DNA profiles
cov1000 <- dbVariance(freqs,theta=0,n=1000)
## The result is the same as:
comps1000 <- choose(1000,2)*comps$V1 + 6*choose(1000,3)*comps$V2 + 6*choose(1000,4)*comps$V3
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab