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

st: Inputting data from inside .do-file

From   [email protected]
To   [email protected]
Subject   st: Inputting data from inside .do-file
Date   Fri, 8 Jul 2005 13:53:11 +0200

Dear Statalisters,

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:

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?

Thank you in advance.


*   For searches and help try:

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