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

Re: st: Problem with genhw...


From   "G. Mark Holmes" <gholmes@email.unc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Problem with genhw...
Date   Thu, 22 Aug 2002 07:08:37 -0400 (EDT)

If you tokenize d* you will get "d*" in `1' (literally). That is, tokenize
will not exapnd varlists.

One solution:

unabbrev d*
tokenize $S_1
while "`1'" ~= ""{
       genhw `1' `2'
       mac shift 2
 	}

m

> I have a load of genotype data for a whole genome screen and
> simply want to test each locus for Hardy-Weinberg equilibrium
> using the -genhw- command.  Since there are 370 markers I
> thought I'd use the following to achieve this...
>
> tokenize d*
> while "`1'" ~= ""{
> 	genhw `1' `2'
> 	mac shift 2
> }
>
> However upon execution I'm told that
>
> too many variables specified
> r(103)
>
> genhw works fine if I type in the variable names, but this is very
> repetative (boring and time consuming).
>
> Can anyone suggest why this might be happening.
>
> Thanks in advance for any help
>
> Neil
>
> Neil Shephard
> Genetics Statistician
> ARC Epidemiology Unit, University of Manchester
> neil.shephard@man.ac.uk
> neil.shephard@mindless.com
>
> "Contrariwise, if it was so, it might be; and if it
> were so it would be; but as it isn't, it ain't. That's
> logic" - Tweedledee (Alice Through the Looking Glass)
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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