Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: extracting select saved results using column names


From   Ben Cooper <[email protected]>
To   "[email protected]" <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index