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

st: matrix-addressing rownames-inserting missings

From   "Nicole Schneeweis" <[email protected]>
To   <[email protected]>
Subject   st: matrix-addressing rownames-inserting missings
Date   Fri, 03 Jun 2005 11:24:56 +0200


i'm exporting cells out of matrices, and have a problem when cells are

To be more precise:

it's important for me, to address the relevant row of a matrix with its
name, not with its number (because it's a loop and numbers are changing,
not names)

e.g. matrix M  is defined with rownames, a, b, c. I need the first
column of row "b" and therefore I create a new matrix: matrix

Now, the problem is the following: in some matrices (of the loop) not
all rows are available, but eg only the rows a and c.

The loop stops when "b" is not found! I want Stata to insert a missing
and going on, rather than giving the error message and stopping the

Possilbly there is an option, how to treat not-found-rows or an
if-function has to be implemented. But how?

Does anyone know a solution to this problem???


*   For searches and help try:

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