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]

Re: st: Stata to Latex: Table of tables


From   Chamara Anuranga <[email protected]>
To   [email protected]
Subject   Re: st: Stata to Latex: Table of tables
Date   Sat, 1 Jun 2013 15:14:42 +0530

It is not clear the structure of dataset. However you can try estimate
store with foreach command then use estimate table command. then you
can copy and paste your result to excel or other spread sheet program
and link the result to proper table.

otherwise it is possible to do using postfile command. after each
regression copy your data to another file using postfile command using
estimates result (ereturn) you may have to use matrix command such as

example:

sysuse auto,clear
tempname memhold
postfile `memhold' str20 varname df nob double (b V) using
"resultci.dta",replace
foreach var of varlist  price rep78 headroom trunk weight length {
reg mpg `var'
matrix b1=e(b)
matrix v1=e(V)
post `memhold'  ("`var'") (e(df_r)) (e(N)) (b1[1,1]) (v1[1,1])

}
postclose `memhold'
use resultci.dta,clear
gen StdErr=V^.5
gen t=b/StdErr
gen p=(2*ttail(df), abs(t))
gen ll=b-invttail((df),0.025)*StdErr
gen ul=b+invttail((df),0.025)*StdErr


Thanks,
Chamara

On Sat, Jun 1, 2013 at 2:02 PM, Stefan Bernhard
<[email protected]> wrote:
> My setup is that I have 60 regressions, which go over 6 years and 10
> categories. From each regression, I only need one coefficient.
> I want to put these 60 coefficients (and standard errors) into a Table
> with the format where the columns are the years and the rows are the
> categories.
>
> ......2007 2008 2009...
> cat1   X     X      X
> cat2   X     X      X
> cat3   X     X      X
> ...
>
> Is there anyone who knows how to do that (I currently do it by hand
> but that is tedious and prone to mistakes).
> Regards, Stefan Bernhard,
> *
> *   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/
*
*   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