Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Stata/SE 10 very slow reading program code


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Stata/SE 10 very slow reading program code
Date   Mon, 3 Mar 2008 09:45:27 +0000 (GMT)

Two other options are:

You can make other editors act like the Stata do-file editor, so you
won't have cut and past commands, see:
http://fmwww.bc.edu/repec/bocode/t/textEditors.html

Instead of storing ado files along your personal adopath, you can store
them anywhere and -cd- to the directory where it is stored. After that
the program is available. I use this trick when I am changing one of my
programs. While programming I often run a test file that contains lines
like these:

local home "h"
use "`home':/mijn documenten/projecten/stata/hangroot/cavalry.dta"

// where I store my new version
cd "`home':/mijn documenten/projecten/stata/hangroot/1.2.2/"
hangroot deaths [fw=freq], dist(poisson)

This way I can check whether my program works, but when I want to do
use my program for real work, Stata will default to the program stored
along the ado-path. 

As an aside, the local home is due to the fact that at work I work from
the H drive, while at home I work from my C drive, otherwise the paths
are exactly the same. So all I need to do change the local home from c
to h or vise versa when I work at home or at work.

Hope this helps,
Maarten

--- Maarten buis <maartenbuis@yahoo.co.uk> wrote:

> --- Richard Williams <Richard.A.Williams.5@ND.edu> wrote:
> > Stata 10: When I copy the code into a do file and run it, it takes 
> > about a second, same as Maarten.  But when I copy the code into the
> 
> > command window, it takes 18 seconds.
> 
> Ah, that is unexpected behaviour, though in my case it takes about 8
> seconds.
> 
> There are three things you can do, that are both more convenient, and
> avoid this problem. First, you can open the do-file editor and run it
> from there, as described in
> http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html#work
> 
> Second, you can type in stata
> do
>
http://www2.jura.uni-hamburg.de/instkrim/kriminologie/Mitarbeiter/Enzmann/Software/reprate.do
> 
> Or of course -do path/reprate.do- , where path the where the do file
> is
> stored on your computer.
> 
> Third,  you can store the three programs in separate files with the
> extension ado instead of do in in your personal adopath. You can find
> where that is by typing -adopath- within Stata. Once you have done
> that, the programs will be directly available every time you use
> Stata
> on that computer as any other Stata program.
> 
> Hope this helps,
> Maarten
> 
> -----------------------------------------
> Maarten L. Buis
> Department of Social Research Methodology
> Vrije Universiteit Amsterdam
> Boelelaan 1081
> 1081 HV Amsterdam
> The Netherlands
> 
> visiting address:
> Buitenveldertselaan 3 (Metropolitan), room Z434
> 
> +31 20 5986715
> 
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
> 
> 
>       __________________________________________________________
> Sent from Yahoo! Mail.
> A Smarter Inbox. http://uk.docs.yahoo.com/nowyoucan.html
> *
> *   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/
> 


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      __________________________________________________________
Sent from Yahoo! Mail.
A Smarter Inbox. http://uk.docs.yahoo.com/nowyoucan.html
*
*   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