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: xtmixed, outreg2 and esttab


From   Clara Barata <[email protected]>
To   Roy Wada <[email protected]>, [email protected]
Subject   Re: st: xtmixed, outreg2 and esttab
Date   Wed, 21 Jul 2010 14:28:36 -0400

Hi Roy,

Thanks for the extra code. By bad tables I meant that the estimates
for the same predictor were not aligned in the table, but instead were
being added to the bottom of the second column (outreg); or the output
for the two models was being listed sequentially, instead of
side-by-side (esttab). I am big fan of outreg, but the code you
propose seems a bit complicated. I am trying to prepare a set of code
that can be shared with a group of people, some of which are stata
beginners. Also when i ran what you proposed, i got the message
"option ststr() not allowed"

. outreg2  using teacher.doc, addstat ("ICC L1", e(rho1), "ICC L2",
e(rho2),"-2LL",e(ll),"df",e(df_m)) ///
> bdec(3) alpha(.001, .01, .05, .10) symbol(***, **, *, ~) append  long ///
> ststr(eqmatch teacher_age ce1p8)
option ststr() not allowed

Is there a simpler option, maybe using esttab?

Thanks again, Clara

On Wed, Jul 21, 2010 at 1:31 PM, Roy Wada <[email protected]> wrote:
>
> I don't know what you mean by "bad tables", but this will do the job:
>
> * get data
> sysuse auto, clear
> ren price teacher_age
> ren rep78 interv1
> ren foreign idclase1
> ren turn idcoleg1
> ren weight ce1p8
>
>  prog drop _all
> prog define eqmatch
>  syntax anything
>  gettoken one two: anything
>  local one=trim("`one'")
>  local two=trim("`two'")
>  split varname, parse(":") gen(_varname)
>  replace eqname="`one'" if eqname=="`two'"
>  replace report=eqname+":"+_varname2
> end
>
> xtmixed teacher_age interv1 ||idcoleg1: , cov(un)  ||idclase1:, cov(un) mle
> var
> xtmrho
> outreg2  using teacher.doc, addstat ("ICC L1", e(rho1), "ICC L2", ///
> e(rho2),"-2LL",e(ll),"df",e(df_m)) ///
> bdec(3) alpha(.001, .01, .05, .10) symbol(***, **, *, ~) replace long
>
> xtmixed ce1p8 interv1 ||idcoleg1: , cov(un)  ||idclase1:, cov(un) mle var
> xtmrho
> *stick in the new sub-option using ststr( )
> outreg2  using teacher.doc, addstat ("ICC L1", e(rho1), "ICC L2", ///
> e(rho2),"-2LL",e(ll),"df",e(df_m)) ///
> bdec(3) alpha(.001, .01, .05, .10) symbol(***, **, *, ~) append  long ///
> ststr(eqmatch teacher_age ce1p8)
>
>
>
>
>
>
>
> ________________________________
> Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
> Learn more.



-- 
M. Clara Barata, Ed.M
Doctoral student, Human Development and Education
Harvard Graduate School of Education
Larsen 705, 14 Appian Way
Cambridge, MA 02138

Lab phone: 617-496-0535
Fax: 617-495-3626
Cell: 857-253-1138

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index