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 on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: Plotting regression constants


From   Christophe Kolodziejczyk <ck.statalist@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Plotting regression constants
Date   Sun, 7 Aug 2011 14:38:07 +0200

Jennifer,
Maybe you can try this


After your estimation command

mat b = e(b)
local eqlist : coleq b
di "`eqlist'"
local eqlist : list uniq eqlist
di "`eqlist'"

gen b_cons=.

local i=1
foreach x of local eqlist {
    replace b_cons=_b[`x':_cons] if _n==`i++'
    }

// then plot b_cons

graph box b_cons

Best
Christophe


2011/8/6 Jennifer M Keister <jkeister@ucsd.edu>:
> Dear All,
>
> I am working with a system of regression equations in which I am primarily interested in the value of the constants--for this particular analytic setup, these are the predicted probabilities of interest.
>
> Rather than displaying these numbers in a table, I would like to show the constants from all of the equations in the system graphically in a box plot.
>
> Is there a way to store the estimates from my regressions and ask Stata to plot only the constants?
>
> Many thanks in advance,
>
> Jen Keister
> Ph.D Candidate, UC San Diego
> *
> *   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/
>

*
*   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