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

st: matrix size and ranking values


From   "NEYMOTIN, FLORENCE" <[email protected]>
To   [email protected]
Subject   st: matrix size and ranking values
Date   Tue, 28 Jun 2005 10:39:00 -0700

Hi, before you complain that this is not stata-`ese' let me start by saying that this is really coded in matlab but needs to be forced into stata, hence my difficulties.

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?
Thank you,
Florence
*
* 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