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

st: RE: RE: Re: How to speed up loop


From   "Scott Merryman" <smerryman@kc.rr.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: Re: How to speed up loop
Date   Fri, 17 Sep 2004 06:21:39 -0500

Nick,

Could you please explain how this -gen mage = age[mlineno]- works or where I
could find it. I realize that square brackets are used for explicit
subscripting, but is not clear to me how this working.

Thank you,
Scott


> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
> Sent: Wednesday, September 15, 2004 11:43 AM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: RE: Re: How to speed up loop
> 
> Looks like
> 
> by hhid : gen mage = age[mlineno]
> 


<snip>

> > hhid    lineno       age   mlineno      mage
> >    1         1        32         .         .
> >    1         2        30         .         .
> >    1         3         5         2        30
> >    2         1        68         .         .
> >    2         2        41         1        68
> >    2         3        40         .         .
> >    2         4        17         3        40
> >    2         5        14         3        40
> >

*
*   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