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: Making a bar graph from the row of a matrix


From   Mauricio Esteban Cuak <[email protected]>
To   [email protected]
Subject   st: Making a bar graph from the row of a matrix
Date   Wed, 3 Apr 2013 15:18:45 -0500

Hi,

Sorry if this a question that's been answered before. I've read the
help files, searched statalist and couldn't find an answer.
I need to automate the production of several graphs from the rows of matrices.
Consider this code:

clear all
sysuse auto.dta
qui reg price mpg trunk weight
matrix test = e(V)
matrix rowtest = test["weight", 1...]
matrix list rowtest

Which gives as a result

rowtest[1,4]
               mpg         trunk              weight       _cons
weight   42.603766  -28.071666   .50422716  -2043.6635


I'd like to produce a bar graph where the labels "mpg", "trunk",
"weight" and "_cons" are in the horizontal axes and vertical bars
represent the values
(42.60, -28, etc.). If it is possible, the title of the graph should
be "rowtest"
Thanks for your time!

ME
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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