[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: RE: Learning how to program Stata
This order may help you, as it was what I did (actually I'm still learning):
1) At first, don't try to do a -program- .. make do-files with macros...
local y wages
local x inflation gdp productivity
regress `y' `x'
Even better, dont do this kind of stuff in do-files.. as you can use
2) Learn foreach / forvalues.. if you do that, you are mostly gonna
need to use the return commands (ereturn, return, etc.) to be able to
store results in tables, etc.
3) After you feel confortable with 1) and 2), go for programs. Also,
you MUST be VERY familiar with Stata's syntax.
Learn the -program-, -syntax-, -macro-, etc. commands in the
programming guide. At this point, Stata's manuals should be like your
Some more advice: If you start reading the official ADO files, you may
feel discouraged as they are fairly complex (due to efficiency and its
fool-proof nature). Stuff like `"`var'"' can be quite puzzling at
first. Also, if you want to grasp the basics of programming in a fast
way, try reading some of the manuals that are out there (mostly from
Nicholas Cox and Christopher Baum). For example, this one is quite
On 8/3/05, Mosi A. Ifatunji <firstname.lastname@example.org> wrote:
> Thanks Nick,
> I definitely appreciate your concern. In this case, I really do mean
> On 8/3/05 2:50 PM, "Nick Cox" <email@example.com> wrote:
> > Richard Williams gave some good advice. But he
> > was taking you very literally, that when you
> > say "program" you really do mean "program", i.e.
> > that you will find myself writing -program-
> > files. Until you give examples of what you
> > want, it is not obvious that you do need
> > to learn to program in Stata: it may be
> > that you can do what you want with e.g.
> > do files.
> > Nick
> > firstname.lastname@example.org
> > Mosi A. Ifatunji
> >> I am interested in learning how to program formulas in Stata.
> >> Where might I
> >> go or what might I buy to begin learning?
> > *
> > * 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/
* For searches and help try: