Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Nostop in do files


From   Neil Shephard <[email protected]>
To   [email protected]
Subject   Re: st: Nostop in do files
Date   Fri, 22 Oct 2010 15:33:49 +0000

On Fri, Oct 22, 2010 at 3:19 PM, Katia Bobulova
<[email protected]> wrote:
> The option could be dangerous, but it is useful for preliminary analysis.
>
> I have bot the data and the do files in the same folder.
>
> So I open the dataset and then I type:
> do 2000, nostop
>
> where 2000 is the name of my do file I receive the message file
> 2000.do not found
>
> Could you please help me to solve this problem?

Without output its pretty hard to tell, but I'll hazard a guess at
what you're doing...

1) You start up Stata

2) You open your file with File -> Open, navigate to the location and
open the dataset

3) You now type 'do 2000, nostop' and get told the file isn't found.

This is because whilst the data file and do file are in the same
location, Stata is not currently "in" that directory.

Type -pwd- to see what directory Stata is in, if the output of this is
NOT the directory where your files are then use the -cd- command to
change directory to the location of the files.

I'll further hazard that your on M$-Windoze, so something like...

cd "c:/this/is/where/i/have/saved/my/files"
use mydata, clear
do 2000, nostop

...should hopefully achieve what you are trying to do (although
obviously substituting the directory path (
"c:/this/is/where/i/have/saved/my/files" double quotes are important
if you have a space in the path) for where you have actually saved it,
and the data file name for the name you have called your data
("mydata", again double quotes are important if you have a space in
the filename)).

Personally I never touch the menu system in Stata, insteading working
exlusively with do-files and -cd-ing to the relevant directory first.

These are very basic (and fundamental) steps to working with Stata.  I
would recommend one of the introductory texts to Stata available from
Stata Press such as...

http://www.stata-press.com/books/acock3.html
http://www.stata-press.com/books/ishr3.html
http://www.stata-press.com/books/daus2.html

..or similar.  Alternatively you may find the the Stata NetCourse
useful http://www.stata.com/netcourse/nc101.html which covers these
basics.

Neil

-- 
"Our civilization would be pitifully immature without the intellectual
revolution led by Darwin" - Motoo Kimura, The Neutral Theory of
Molecular Evolution

Email - [email protected]
Website - http://kimura-no-ip.org/
Photos - http://www.flickr.com/photos/slackline/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index