[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Ronnie Babigumira <rb.glists@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Table of results |

Date |
Wed, 24 Oct 2007 18:34:43 +0200 |

Dear Austin

Thanks for the reply. This completely new but exciting territory for me.

I have tried to follow the example in the link you sent and here is what I have done so far (I welcome any comments you may have to make it better).

local r1c1= `"Radius"'

local r1c2= r(attr)

local r1c3= r(seattr)

local r1c4= r(tsattr)

tempname out

file open `out' using rx_results.txt, write replace

file write `out' "Method" _tab "Effect" _tab "SE" _tab "t"

file write `out' _n "`: di "`r1c1'"'"

file write `out' _tab "`: di %4.3f `r1c2''"

file write `out' _tab "`: di %4.3f `r1c3''"

file write `out' _tab "`: di %4.3f `r1c4''"

file close `out'

I had some trouble including the method name but after trying a whole set of quote combinations, I got lucky. Here is what the first take of rx_results.txt looks like

Method Effect SE t

Radius -0.182 0.010 -18.119

Just a couple of questions.

i) If I have 10 rows and 4 columns so what the locals are r1/r10 and c1/c4. How would I put this in a loop

ii) My plan is to typeset this in LaTeX so is it a simple matter of replacing the _tab with "&" and adding an extra line with \\ to close the row.

Many many thanks (you have no idea how much time I have spent on this)

Ronnie

Austin Nichols wrote:

Ronnie-- You can collect these items in locals (calling them e.g. r1c1 r1c2 etc. for the eventual row and column they should appear in), then write a table to the Results window or a file, or you can write a table to a text file as you go using the -file- command; see e.g. http://www.stata.com/statalist/archive/2006-04/msg01090.html On 10/24/07, Ronnie Babigumira <rb.glists@gmail.com> wrote:Dear Listers I am estimating treatment effects using the -pscore-/-att*- suite of programs (Becker and Ichino, Stata Journal 2,4). Each of the att* commands leaves behind among other results - the treatment effect - Standard error - t value though, the macro names are different so for example, for -attnd- they would be effect: r(attnd) se: r(seattnd) t: r(tsattnd) While -attr- we would have effect: r(attr) se: r(seattr) t: r(tsattr) I will be trying a number of options and would like to have all the results in one table that would look something like this one below +------------------------------+ | method | effect | s_e | t | |-----------+--------+-----+---| | nearneigh | 1000 | 10 | 3 | | | . | . | . | | | . | . | . | +------------------------------+ How can I do this in Stata* * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

* * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: Table of results***From:*"Austin Nichols" <austinnichols@gmail.com>

**References**:**st: New Resource for Using R with Stata***From:*"Rob Kabacoff" <robk@statmethods.net>

**st: Table of results***From:*Ronnie Babigumira <rb.glists@gmail.com>

**Re: st: Table of results***From:*"Austin Nichols" <austinnichols@gmail.com>

- Prev by Date:
**Re: st: Time without date** - Next by Date:
**Re: st: Why option "robust" and "cluster" doesn't work?** - Previous by thread:
**Re: st: Table of results** - Next by thread:
**Re: st: Table of results** - Index(es):

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