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

st: RE: Inputting data from inside .do-file


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Inputting data from inside .do-file
Date   Fri, 8 Jul 2005 13:53:59 +0100

Why not just use -use- and distribute the .dta file 
with the program? 

Nick 
[email protected] 

[email protected]
> 
> I am making an .ado-file to produce a large number of 
> standardized incidence
> rates. The program uses data from the standard population stored in
> 'standardpop.dta' which has 3468 records. Now, I have to keep 
> this standard
> population with the .ado-file as an ancillary file, and I 
> thought it would
> be easier if the data from 'standardpop.dta' could be entered 
> automatically
> from inside my .ado-file. 
> 
> I could do it like this:
> 
> clear
> set obs 3468
> input year male age pop
> 1901 0 0 151800
> 1901 0 5 133900
> 
> ...etc., but it's hard work!
> 
> Could anybody suggest a more efficient way?

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