set obs 1000
gen value = .
qui forval i = 1/1000 {
replace value = x`i'[1,1] in `i'
}
sort value
l if inlist(_n,50,950)
Nick
[email protected]
P.S. matsize 800 is not a limit in all versions
of Stata.
P.P.S. your comment about not being able
to change the data is not convincing:
as you know about -restore-, you can
get round any restriction.
NEYMOTIN, FLORENCE
> If I have 1000 vectors (nx1 matrices) and I would like to
> compare the first value in each vector
> in order to find the 50th largest, and the 950th largest of
> these values, is there an easy way to
> do this in stata? I know I can't have more than 800 entries
> in any one vector, so I'm not able to
> simply create a vector that contains within it the first
> value in each of the original 1000
> vectors. I am also NOT able to change the data because it is
> already in a mode that needs to be
> put into restore later. Is there an easy algorithm anyone
> can think of to do this?
*
* 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/