Bookmark and Share

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

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

st: extracting select saved results using column names

From   Ben Cooper <>
To   "" <>
Subject   st: extracting select saved results using column names
Date   Fri, 24 Feb 2012 16:52:57 +0000


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!


*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index