# Sib-pair Command: mcfrequency

 Class Analysis and data manipulation command Name mcfrequency Arguments | \$m.

Print MCEM (Monte-Carlo Expectation-Maximization) estimates of the founder allele frequencies for marker loci. A fixed number of EM iterations are carried out, usually 20. This can be set higher if desired using the set emit command.

When all individuals genotyped are unrelated, then the maximum likelihood estimates of the allele frequencies in the population from which the sample are drawn are simply the sample frequencies. This is also asymptotically true for data from related individuals. So, for large datasets, the naive counting estimates that Sib-pair usually uses approach the MLEs. For smaller samples of families, these estimates can be improved upon. The MCEM algorithm Sib-pair offers seems to give answers very similar to those obtained by numerically maximizing the pedigree likelihood.

Example:

```>> include volgaex.in
>> set iterations 200
>> set timer on
#
# Naive estimates of marker frequencies
#
>> fre D14S52

------------------------------------------------
Allele frequencies for locus "D14S52"
------------------------------------------------
Allele  Frequency   Count  Histogram
57     0.0238        1  *
69     0.0238        1  *
81     0.0476        2  *
83     0.4286       18  *********
85     0.1905        8  ****
87     0.2381       10  *****
93     0.0476        2  *

Number of alleles    =    7
Heterozygosity (Hu)  =    0.7352
Poly. Inf. Content   =    0.6763
4 Neff mu (SSMM)     =    4.88968079
Number persons typed =     21 ( 27.3%)
[    0.00 s]
#
# Maximum likelihood estimates of marker frequencies
#
>> mcf D14S52

------------------------------------------------
MCEM allele frequencies for locus "D14S52"
------------------------------------------------
Allele  Frequency   Count  Histogram
57     0.0495        2  *
69     0.0422        2  *
81     0.0411        2  *
83     0.4938       19  **********
85     0.0820        3  **
87     0.2489        9  *****
93     0.0425        2  *

Number of alleles    =    7
Heterozygosity (Hu)  =    0.6981
Poly. Inf. Content   =    0.6405
4 Neff mu (SSMM)     =    3.69111229
Number of founders   =     19 (  2.6% typed)
[   11.84 s]
```

For the same data, the maximum likelihood estimates from MENDEL 7.0 are:

``` LOCUS      ALLELE       ESTIMATED    STANDARD
NAME        NAME        FREQUENCY     ERROR

D14S52     57            0.0431       0.0422
D14S52     69            0.0431       0.0422
D14S52     81            0.0431       0.0422
D14S52     83            0.4950       0.1072
D14S52     85            0.0822       0.0639
D14S52     87            0.2505       0.0915
D14S52     93            0.0431       0.0422
```