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: estout command


From   Nikolaos Pandis <[email protected]>
To   [email protected]
Subject   Re: st: estout command
Date   Sun, 17 Oct 2010 10:33:47 -0700 (PDT)

Many thanks Tim. It did work.
Nick

--- On Sun, 10/17/10, Tim Wade <[email protected]> wrote:

> From: Tim Wade <[email protected]>
> Subject: Re: st: estout command
> To: [email protected]
> Date: Sunday, October 17, 2010, 7:20 PM
> Did you try using -estadd- with the
> stats option in -estout-? (both
> ser written programs by Ben Jann, available from SSC.
> type:  findit
> estadd)
> 
> Something like:
> 
> clogit case,group(set) or
> estimates store null_model
> 
> foreach myvar of varlist x1 x2 x3 x4 x5{
> clogit case i.`myvar',group(set) or
> estimates store `myvar'
> lrtest `myvar' null_model
> estadd scalar p_lr=r(p)
> estout `myvar' using estout_table.xls, stats(p_lr)
> cells("b
> (fmt(%5.2f)) ci (fmt(%6.2f)") eform  refcat(`myvar')
> append
> 
> }
> 
> 
> I could not test this since I don't have a reproducible
> data set. It
> would put the p-value in a row at the bottom of each
> column.
> 
> Hope this helps, Tim
> 
> 
> 
> On Sat, Oct 16, 2010 at 12:35 PM, Nikolaos Pandis <[email protected]>
> wrote:
> > Hi to all.
> >
> > I running the following loop for a set of categorical
> variable x1-x5 as shown below:
> > ........................................
> > foreach myvar of varlist x1 x2 x3 x4 x5{
> > clogit case i.`myvar',group(set) or
> > estimates store `myvar'
> > clogit case,group(set) or
> > estout `myvar' using estout_table.xls,cells("b
> (fmt(%5.2f)) ci (fmt(%6.2f)") eform  refcat(`myvar')
> append
> > }
> > ......................................
> >
> >
> > I would like to perform an -lrtest- for each variable
> (after -clogit-) vs the null model, which would be included
> in the previous code:
> > ................................
> > clogit case,group(set) or
> > estimates store null_model
> > lrtest `myvar' null_model
> > ...........................
> >
> > Question. I was wondering if there is a way to include
> the result of the LR test in the estout output and add it on
> the last column. I understand that I could add the -p- in
> parenthesis in the cells option for the Wald test between
> baseline and each category but I do not need this.
> >
> > Many thanks,
> >
> > Nick
> >
> >
> >
> > *
> > *   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/
> 


      

*
*   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