This vignette will introduce you to find the critical value for comparison of observed and expected obtained last step.
Simulate_DistK
and Simulate_DistX
simulate bundles of expected distributions for number of heterozygous loci and number of shared alleles respectively.
Simulate_DistK(H,100,500)
Simu_K <- Simulate_DistX(e,100,500) Simu_X <-
Dist_SimuChisq
generates a bundle of chi-square values which can be distributed. ecdf
build the cumulative probability functions for the chi-square values.
Dist_SimuChisq(Simu_K,ExpDist_K$Density,200)
x2_K<-Dist_SimuChisq(Simu_X,ExpDist_X$Density,200)
x2_X<-ecdf(x2_K)
P1<-ecdf(x2_X) P2<-