Statalist The Stata Listserver

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

st: drop in a do-file

From   Kit Baum <>
Subject   st: drop in a do-file
Date   Sat, 18 Nov 2006 20:56:32 -0500

Joseph writes

I am automating a bunch of commands in a do file, so I can rerun the do file, just changing the argument.

If I have a:

drop km*

in my do file, the first time thru, it fails because it can't drop it.

No problem, since I can run as: do clusterk 4, nostop
and it goes fine.

However, if I rerun the next time thru as: do clusterk 6, nostop, it fails with error number 198,
saying that variable km2 exists. You can see that the drop works though, since it disappears
from the variables window.

help capture

Kit Baum, Boston College Economics
An Introduction to Modern Econometrics Using Stata:

* For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index