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

RE: st: Re: trickier subscript question


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Re: trickier subscript question
Date   Fri, 2 Apr 2004 10:50:23 +0100

In my reply to you yesterday I made some suggestions. 

==============
One exposition linking a introduction to local macros 
to one on -for*- is 

How to face lists with fortitude. Stata Journal 
2(2): 202-222 (2002) 

A version of that is accessible at (e.g.) 
http://fmwww.bc.edu/RePEc/usug2002/fortitude.pdf

A sequel to that is 

Problems with lists. Stata Journal 3(2): 
185-202 (2003) 
============== 

Nick 
n.j.cox@durham.ac.uk 

Kenley Barrett

> Thank you for your help. Do you have any advice on where I 
> could read up about macros?
 
Michael Blasnik 

> >i is a local macro (and must be referreed to as `i' when used in
> >expressions) , not a variable and you want j to be the same 
> (after all, they
> >have nothing to do with observations, they are just counters).
> >
> >local j=`i'-1
> >
> >It would be worthwhile to read up about macros if you want to program
> >effectively or write complicated loops.

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