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

st: Help with Reading Arguments for Do-File


From   "George Stimson" <stimson@netz.us>
To   statalist@hsphsun2.harvard.edu
Subject   st: Help with Reading Arguments for Do-File
Date   Sun, 13 Nov 2005 20:33:03 -0600

Thanks again for the help several of you provided in response to my
earlier query.

As I said before, I'm a new user and am working with Stata 9.1 for
Windows under Windows XP with SP2.

I'm now trying to learn another simple programming task that ought to be
easy, but I can't make it work -- even though I believe I've followed
the manual's examples exactly.  (I have read sections 16.6.1 and 18.4.
in the User's Guide, and cannot identify what I'm doing wrong.)

The following transcript from an interactive session shows one instance
of the code I've tried and displays the resulting error in reading
arguments:

. clear all

. program myprog
  1. webuse auto
  2. correlate '1' '2'
  3. end

. myprog mpg price
(1978 Automobile Data)
' invalid name
r(198);

(I'm was running this interactively, which is why the lines in the
program are numbered.)

If anyone can help me figure out what I'm doing wrong and why my code
does not accept the arguments, I'd be very grateful.

Cheers,
George

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