victor michael zammit
>
> Thanks Nick,
> that was quite helpful.In the case where output is in the 1000's, it
> becomes tedious to paste on do-file editor ,border by
> "input se lb ub" at
> the beginning and then "end" at the end,and then activate
> the do-file to
> generate my desired variables.I am wondering if there is
> any trick that
> eliminates the necessity to paste.
> The following abbreviated log shows the work I had to do :
> . type 15may.log
>
> . do "C:\WINDOWS\TEMP\STD010000.tmp"
> . use A1toA100,clear
> .
> . local i = 1
>
> . while `i' <= 100
>
> 2. qui ci A`i'
> 3. di r(se) " " r(lb) " " r(ub)
> 4. local i = `i' + 1
> 5. }
> .58309519 .58106823 3.8189318
> .50990195 .98428524 3.8157148
> .50990195 1.1842852 4.0157148
> .....................cut............
> 18.306829 -30.027906 71.627906
> 18.506756 -30.38299 72.38299
> 18.706683 -30.738079 73.138079
> 18.906613 -31.093171 73.893171
> 19.106543 -31.448268 74.648268
> 19.306476 -31.803369 75.403369
> 19.506409 -32.158474 76.158474
> .
> end of do-file
> . clear
>
> . do "C:\WINDOWS\TEMP\STD010000.tmp"
>
> . input se lb ub
>
> se lb ub
> 1. .58309519 .58106823 3.8189318
> 2. .50990195 .98428524 3.8157148
> 3. .50990195 1.1842852 4.0157148
> ....................cut..........................
> 94. 18.306829 -30.027906 71.627906
> 95. 18.506756 -30.38299 72.38299
> 96. 18.706683 -30.738079 73.138079
> 97. 18.906613 -31.093171 73.893171
> 98. 19.106543 -31.448268 74.648268
> 99. 19.306476 -31.803369 75.403369
> 100. 19.506409 -32.158474 76.158474
> 101.
> . end
>
> .
> end of do-file
>
> . list
>
> se lb ub
> 1. .5830952 .5810682 3.818932
> 2. .5099019 .9842852 3.815715
> 3. .5099019 1.184285 4.015715
> 4. .5830952 1.181068 4.418932
> 5. .7071068 1.036757 4.963243
> ......................cut............................
> 97. 18.90661 -31.09317 73.89317
> 98. 19.10654 -31.44827 74.64827
> 99. 19.30648 -31.80337 75.40337
> 100. 19.50641 -32.15847 76.15848
>
> . log close
My original posting outlined two approaches. You here use and
comment on #1. You complain correctly about needing to edit
output into a new data set. This is answered by #2,
which leaves behind the results as variables in memory in the
same data set.
Naturally, for a larger data set you need to edit
the number of observations used for the data set.
Nick
[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/