Statalist


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

Re: st: Re: Using xml_tab


From   Alan Neustadtl <alan.neustadtl@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Re: Using xml_tab
Date   Mon, 2 Mar 2009 16:20:26 -0500

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 <zsajaia@hotmail.com> 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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index