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

st: matrix question


From   "Indranil Majumdar" <imajumdar@creditsights.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: matrix question
Date   Thu, 24 Mar 2005 12:34:40 -0500

Hi,

I have a matrix (mat1) with the following data (extract).

. matrix list mat1

mat1[260,2]
        ratsect     cutoff
  r1     999999  3.435e-06
  r2     999999  4.572e-06
  r3     999999  6.596e-06
  r4     999999  9.606e-06
  r5     999999  .00001548
 r22     999998  5.470e-06
 r23     999998   .0000119
 r24     999998   .0000177
 r25     999998   .0000295
 r26     999998   .0000439

I want to create another matrix (say mat2) with only those rows that have a
particular 'ratsect' e.g. 999999

I guess the command will look something like the following.
matrix mat2 = mat1["some expression ???",2]
I am not sure how to filter rows based on a criterion.
Any help will be appreciated.

Thanks,
Indranil
CreditSights. Inc,
(212) 340-3820

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index