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
r(7);
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,