[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: RE: matrix size and ranking values |

Date |
Tue, 28 Jun 2005 20:57:49 +0100 |

There are many ways of getting round restrictions such as this, such as a -save- of the data, -drop-ping a variable you just -generate-d but don't want to keep, etc. Yet another way is to write a program involving temporary variables to do this. That makes no change to your data. The Statalist FAQ advises "The current version of Stata is 9. Please specify if you are using an earlier version; otherwise, the answer to your question is likely to refer to commands or features unavailable to you." Nick n.j.cox@durham.ac.uk NEYMOTIN, FLORENCE > I can't change the data because I ALREADY DID a preserve, so > I want to get the original data back > ONLY AT THE VERY END and I don't want to do another preserve > before that. I am writing this to be > compatible with stata7 so matsize 800 is a binding > constraint. Thank you for the suggestions!! > florence > > > On Tue, 28 Jun 2005 20:41:54 +0100 > "Nick Cox" <n.j.cox@durham.ac.uk> wrote: > > 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 > > n.j.cox@durham.ac.uk > > > > 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/

- Prev by Date:
**Re: st: RE: matrix size and ranking values** - Next by Date:
**st: sort** - Previous by thread:
**Re: st: RE: matrix size and ranking values** - Index(es):

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