Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: genhw (bug?)

From   "Andrea Baccarelli" <>
Subject   st: genhw (bug?)
Date   Thu, 20 Feb 2003 00:11:53 +0000

I am using the command genhw in Stata 7.0 to estimate the allelic frequency and Hardy-Weinberg Equilibrium in a dataset with multiple single nucleotide polymorphisms (SNPs).

I created two variables for each genotype (i.e.: a1 and a2) as following:
Genotype wt: a1==0, a2==0
Genotype heterozigous: a1==1, a2==0
Genotype homozigous: a1==1, a2==1

The command works generally fine.
Unfortunately I, have several SNPs without homozigous genotypes (i.e.: a2 is always==0). For these SNPs the command do not work.
I receive the following output:

',' found where integer expected

Note that when I use the actual numbers with the immediate command (genhwi), the command works just OK.
I could input the genotype frequencies one by one, but it will take a lot of time. Does anyone have any idea how to solve this problem?
Thanks a lot,

Andrea Baccarelli,
NCI, Bethesda

STOP MORE SPAM with the new MSN 8 and get 2 months FREE*

* For searches and help try:

© Copyright 1996–2019 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index