The name is absent



36


Stata Technical Bulletin


STB-48


Hardy-Weinberg Equilibrium Test :

Pearson chi2 (1) = 1.956 Pr= 0.1620
likelihood-ratio chi2 (1) = 1.959 Pr= 0.1616
Exact significance prob = 0.1793

Example 2: multiallelic locus

Spencer et al. (1964) examined the distribution of the red cell acid phosphatase polymorphism in 178 randomly selected
individuals. They identified 3 alleles at this locus; A, B and C. We would like to test the null hypothesis that these data are
consistent with Hardy-Weinberg equilibrium. Their data has been entered into Stata. Here are the first ten observations:

. list in 1/10

alll       all2

1.

A

A

2.

A

B

3.

A

C

4.

B

B

5.

B

C

6.

A

B

7.

A

B

8.

B

B

9.

A

A

10.

B

B

We now perform the test for Hardy-Weinberg equilibrium:

. genhw alll all2

Genotype

I Observed

Expected (

Disequilibrium

Coefficient (D)

AA
AB

AC

BB
BC

CC

I          17

I          86

I              5

I          61

I              9

I              0

21.95

76.19

4.92

66.14

8.53

0.28

-0.0275

-0.0002

-0.0013

Total

Allele

I        178

I Observed

178.00

Frequency

Std. Err.

A
B

C

I        125

I        217

I          14

.+-----------

0.3511

0.6096

0.0393

0.0237

0.0242

0.0101

Hardy-Weinberg Equilibrium Test :

Pearson chi2 (3) =    3.078 Pr= 0.3798

likelihood-ratio chi2 (3) =    3.407 Pr= 0.3330

Similar to the output in the biallelic case, genotype and allele frequency tables are produced. However, instead of only one
disequilibrium coefficient, in the multiallelic case, a disequilibrium coefficient is estimated for each heterozygous genotype.

For these data, we fail to reject the null hypothesis that the population is in Hardy-Weinberg equilibrium with respect to
this locus.

Saved results

genhw saves in r():

Scalars

r(chi2)
r(df)
r(chi2_p)
r(lr.chi2)
r(lr_p)
r (p_exact )
r(D)


Pearson’s chi squared
degrees of freedom
significance probability (Pearson)
likelihood-ratio chi squared
significance probability (LR)
exact significance probability (biallelic only)
disequilibrium coefficient (biallelic only)



More intriguing information

1. Creating a 2000 IES-LFS Database in Stata
2. Confusion and Reinforcement Learning in Experimental Public Goods Games
3. THE CO-EVOLUTION OF MATTER AND CONSCIOUSNESS1
4. The Role of Evidence in Establishing Trust in Repositories
5. Spectral calibration of exponential Lévy Models [1]
6. The name is absent
7. ASSESSMENT OF MARKET RISK IN HOG PRODUCTION USING VALUE-AT-RISK AND EXTREME VALUE THEORY
8. The Integration Order of Vector Autoregressive Processes
9. The name is absent
10. ‘Goodwill is not enough’
11. ROBUST CLASSIFICATION WITH CONTEXT-SENSITIVE FEATURES
12. TINKERING WITH VALUATION ESTIMATES: IS THERE A FUTURE FOR WILLINGNESS TO ACCEPT MEASURES?
13. Investment in Next Generation Networks and the Role of Regulation: A Real Option Approach
14. The name is absent
15. Smith and Rawls Share a Room
16. Fighting windmills? EU industrial interests and global climate negotiations
17. Achieving the MDGs – A Note
18. Computational Experiments with the Fuzzy Love and Romance
19. AN EMPIRICAL INVESTIGATION OF THE PRODUCTION EFFECTS OF ADOPTING GM SEED TECHNOLOGY: THE CASE OF FARMERS IN ARGENTINA
20. The role of statin drugs in combating cardiovascular diseases