source("fbsthw.r") ################################################ # Example 1 # Louis and Dempster (1987) counts = c( 0, 3, 1, 5, 18, 1, 3, 7, 5, 2) EvFBST = fbsthw(counts, prec=0.001) print(EvFBST$p.value) ############################################### # Example 2 # sample of size 30 of genotype frequencies under HWE with gene freq # (0.2, 0.2, 0.2, 0.2, 0.05,0.05,0.05,0.05) counts = c( 3, 4, 2, 2, 2, 2, 3, 3, 2, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0) EvFBST = fbsthw(counts, prec=0.001) print(EvFBST$p.value) ################################################ # Example 3 # Chen and Thomson (1999) Biometrics 55, 1269-1272 counts = c( 5, 40, 12, 6, 32, 2, 30, 55, 15, 33) EvFBST = fbsthw(counts, prec=0.001) print(EvFBST$p.value)