|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Re: Using xml_tab
Not exactly, you can still use format() option as well as -long- and -wide-
when outputting matrices.
As for the significance levels, problem is that when you write "xml_tab A"
matrix A can be any matrix (say 3 columns and 14 rows) program doesn't know
what those three columns correspond to, this mode is used to output any
matrix to xml file. So in this general case xml_tab "won't know" how to
calculate significance levels. but it looks for a matrix A_STARS (for the
main matrix A), and if it exists uses values to assign stars.
A_STARS would have 4 numbers in it: 0, 1 ,2, or 3. 0 corresponding to no
stars, 1 to the highest significance level (p<0.01 by default - ***) 2 -
next level (p<0.05 - **) and 3 to the lowest level (p<0.1 *).
But this means that user will need to calculate this levels and form the
matrix A_STARS manually.
General idea when I was writing this part was that results come from some
other routine or source in a form of a matrix and xml_tab just outputs it in
a "similar" way to it's own estimation outputs.
I guess it can be useful to have option coefonly or something while
outputting estimation results, so that user's will be able to see
significance and also other statistics together with betas. I'll post update
as soon as I have some progress on that.
Zurab
----- Original Message -----
From: "Alan Neustadtl" <[email protected]>
To: <[email protected]>
Sent: Monday, March 02, 2009 4:20 PM
Subject: Re: st: Re: Using xml_tab
Thank you for your examples. After working through them and returning
to the help file it seems that there is a trade-off between writing
out stored estimations and matrices.
Writing out stored estimations allows significant control over the
format and layout of the table but does not allow for things like
renaming the rows or dropping the standard errors.
Writing out matrices allows control over the row labels but not cell
formatting and outputting significance levels (stars) and other
statistics (e.g. R2, etc.).
Am I understanding the difference between the two methods correctly?
Best,
Alan
On Mon, Mar 2, 2009 at 3:45 PM, Zurab Sajaia <[email protected]> wrote:
Hi Alan,
To see variable names instead of (default) labels, you can use -nolabel-
option;
-xml_tab- can also output matrices directly, so you can accumulate your
betas into a matrix and then use xml_tab:
(from your example):
...
regress mpg weight
matrix A = e(b)'
regress mpg weight foreign displacement
matrix B = e(b)'
xml_tab A B, {options}
...
when exporting a matrix, -xml_tab- reads matrix rownames (and row
equations
if present), so to modify text in the rows you can either form the names
for
your matrix, i.e.
matrix rownames A = "this is row 1" "and row 2" (for the third row
"displacement" will remain as the name)
or use -xml_tab-'s option rnames():
xml_tab A B, rnames("this is row 1" "and row2")
when merging two matrices of different size -xml_tab- puts .z by default
for
the added cells (I guess I'll have to change this default), but if you
want
to use any other text, or blank you can specify -mv- option:
xml_tab A B, mv(.z="(missing)") // replace .z missing values with text
"(missing)"
or
xml_tab A B, mv("") //all the missing values, not only .z will be
replaced
by the empty cells
Hope this helps,
Zurab
*
* 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/