Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: extracting select saved results using column names


From   Ben Cooper <ben.cooper@wustl.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: extracting select saved results using column names
Date   Fri, 24 Feb 2012 16:52:57 +0000

Hello,

I use the proportion command with mi estimate on a daily basis. After
running the proportion, I know that I can extract the coefficients for
that proportion and save them in a matrix with other coefficients from
other proportions I have run. However, I frequently run proportions on a
binary variable and do so over a multi-category variable. I only want to
grab the "Yes" (or 1) side of a binary 1/0 proportion and accompanying
results from the over variable. And since the types of "over" variables I
might specify in a foreach loop could vary in the number of categories
they have, I can't simply specify the same matrix cells each time.

Is there a way to grab only matrix data from e(b) that matches a specified
string value in the default matrix colname? For example, I know that I
only want the matrix columns from e(b) that contain "_prop_2" since they
are the columns that contain the "1" values from the proportion. I hope
that makes sense, and of course, there may be an easier way to do what I
am trying to do as well!

Thanks,
Ben


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index