Statalist The Stata Listserver


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

Re: st: running do files from unix -- can we pass values to thedo file?


From   Pablo Mitnik <[email protected]>
To   [email protected]
Subject   Re: st: running do files from unix -- can we pass values to thedo file?
Date   Sat, 18 Feb 2006 11:20:50 -0600

Thanks much!!!!

Richard Williams wrote:
At 11:37 AM 2/18/2006, Pablo Mitnik wrote:

An elegant and efficient alternative would be to be able to pass the values of the locals to the do file when running it, something like:

stata -b do dofile localvalue1 localvalue2 &

Of course, this cannot be done this way.
Come to think of it, you don't even need the -args- command. Just have your do file be something like this:

use "http://www.indiana.edu/~jslsoc/stata/spex_data/ordwarm2.dta";
ologit warm `1' `2', nolog

i.e. refer to the parameters as `1', `2', etc.

If there were inconsistencies across runs, e.g. sometimes the number or type of parameters would be different - check out the -syntax- command, as it gives you more flexibility if you need it.


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
*
* 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/
--
Pablo A. Mitnik
University of Wisconsin-Madison (http://www.wisc.edu/ )
Department of Sociology ( http://www.ssc.wisc.edu/soc/)
Center on Wisconsin Strategy (http://www.cows.org/ )
1180 Observatory Drive
Room 7114A
Madison, WI 53706
TEL (608) 2621839
E-mail: [email protected]
*
* 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index