Dear Listers,
given a dataset with 100 variables,of five observations in each,where the
5th observation goes from 1 to 100, e.g. :
a1 a2..... a50...... a100
1 1 1 1
2 2 2 2
3 3 3 3
4 4 4 4
1 2 50 100
The dataset is saved as A1toA100
I would like to postfile the standard error,the lower bound and the upper
bound for each variable,at 95% confidence.I am using Stata 6.0.What I am
doing is this case is to program the following ,with the ensuing result:
quietly {
capture program drop pstfle
program define pstfle
use A1toA100,clear
keep A`1'
quietly ci
di r(se) " " r(lb) " " r(ub)
end
}
pstfle 1
pstfle 2
pstfle 50
pstfle 100
. pstfle 1
.58309519 .58106823 3.8189318
. pstfle 2
.50990195 .98428524 3.8157148
. pstfle 50
9.5131488 -14.412735 38.412735
. pstfle 100
19.506409 -32.158474 76.158474
After highlight "copy" and "paste" ,I use "edit" the data in a variables'
format.
Is there a more efficient way of doing this ?
Victor M. Zammit
*
* 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/