The name is absent



Stata Technical Bulletin


35


5.

M

M

6.

M

M

7.

M

M

8.

M

M

9.

M

M

10.

M

M

Each observation corresponds to one of the 747 individuals and records that individual’s genotype; the al variable holds
the value of the first allele, and the a2 variable that of the second allele.

We now perform the test for Hardy-Weinberg equilibrium.

. genhw al a2

Genotype Observed        Expected

------------+-----------------------------

MM I           233           242.37

MN I           385           366.26

NN I           129           138.37

total

I             747

747.00

Allele

I Observed

Frequency      Std. Err.

M

I        851

0.5696         0.0125

N

I        643

0.4304         0.0125

total

I      1494

1.0000

Estimated disequilibrium coefficient (D) = -0.0125

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

The command first tabulates the observed and expected (under HW) genotype frequencies, the allele frequencies, and
corresponding estimated standard errors. Then it calculates Pearson’s and the likelihood-ratio chi-squared statistics, and in the
case of a biallelic locus, an exact significance probability is also reported.

For these data all three Hardy-Weinberg tests agree. They are not statistically significant; therefore, we fail to reject the
null hypothesis that the population is in Hardy-Weinberg equilibrium.

We also obtained an estimate of the disequilibrium coefficient (D). At Hardy-Weinberg equilibrium, the expected value of
the disequilibrium coefficient is zero.

An immediate form of the above command that will yield the same results is constructed using the observed genotype
counts:

. genhwi 233 385 129, label(MM MN NN)

The label () option is used to label the tables. The genhwi command expects the genotype counts to be ordered as shown
in the syntax diagram.

Because there is no statistical evidence that this population is not in Hardy-Weinberg equilibrium, we can rerun the command
specifying the binvar option producing binomial standard error.

genhw al a2, binvar

Genotype I

Observed

Expected

MM I

233

242.37

MN I

385

366.26

NN I

129

138.37

____________

total I

747

747.00

Allele

Observed

Frequency      Std. Err.

M I

851

0.5696         0.0128 (binomial)

N I

643

0.4304         0.0128 (binomial)

total I

1494

1.0000

Estimated disequilibrium coefficient (D) = -0.0125



More intriguing information

1. Response speeds of direct and securitized real estate to shocks in the fundamentals
2. The name is absent
3. Ahorro y crecimiento: alguna evidencia para la economía argentina, 1970-2004
4. AN ECONOMIC EVALUATION OF THE COLORADO RIVER BASIN SALINITY CONTROL PROGRAM
5. The name is absent
6. Comparison of Optimal Control Solutions in a Labor Market Model
7. THE WELFARE EFFECTS OF CONSUMING A CANCER PREVENTION DIET
8. AN ANALYTICAL METHOD TO CALCULATE THE ERGODIC AND DIFFERENCE MATRICES OF THE DISCOUNTED MARKOV DECISION PROCESSES
9. The name is absent
10. Økonomisk teorihistorie - Overflødig information eller brugbar ballast?