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: RE: Outreg2 addstat- how many macros?
From
Mauro Mastrogiacomo <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
RE: st: RE: Outreg2 addstat- how many macros?
Date
Tue, 23 Aug 2011 14:19:51 +0200
Beatrice,
I see now that your problem is not storing more than 5 estimates, sorry I hadn't understood you in the first place.
Your problem is that you had written the outreg2 command improperly.
Please have a look at this example which makes no sense (I run the same equation over and over), but it should return what you need.
You had made two mistakes. The first is that local macro's are not usable within the addstat syntax, the second was that you needed to properly use the "" symbols before each statistic.
ciao
mauro
use http://www.stata-press.com/data/r11/womenwk, clear
cd l:\mauro
reg wage age
est store a
test( _cons=0) (age=1)
global F1=r(F)
global p1= r(p)
reg wage age
est store b
test( _cons=0) (age=1)
global F2=r(F)
global p2= r(p)
reg wage age
est store c
test( _cons=0) (age=1)
global F3=r(F)
global p3= r(p)
reg wage age
est store d
test( _cons=0) (age=1)
global F4=r(F)
global p4= r(p)
reg wage age
est store e
test( _cons=0) (age=1)
global F5=r(F)
global p5= r(p)
outreg2 [a b c d e] using test1, stats (coef, tstat) addstat("test 1 F", $F1, "test 2 F", $F2 , "test 3 F", $F3, "test 4 F", $F4, "test 5 F", $F5, "p1", $p1, "p2", $p2, "p3", $p3, "p4", $p4) bdec(3) tdec(2) pdec(3) tex replace
> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Beatrice Crozza
> Sent: dinsdag 23 augustus 2011 13:27
> To: [email protected]
> Subject: Re: st: RE: Outreg2 addstat- how many macros?
>
> Thank Mauro for your suggestion.
>
> However, how should I modify the outreg2 command, to use the saved
> results and not the stored?
>
> Thanks a lot,
> Bea
>
> 2011/8/23, Mauro Mastrogiacomo <[email protected]>:
> > Beatrice,
> > there is a maximum to storage in Stata, as far as I know.
> > You could solve this problem by replacing est store with est save.
> > Then a file with extension .ster is stored on your hard disk and not
> in
> > Stata's memory.
> > Mauro
> >
> >> -----Original Message-----
> >> From: [email protected] [mailto:owner-
> >> [email protected]] On Behalf Of Beatrice Crozza
> >> Sent: dinsdag 23 augustus 2011 12:50
> >> To: statalist
> >> Subject: st: Outreg2 addstat- how many macros?
> >>
> >> Dear All,
> >>
> >> I wrote this code for outreg2:
> >>
> >> reg AI1 SI1
> >> est store a
> >> test( _cons=0) (SI1=1)
> >> local F1=r(F)
> >> local p1= r(p)
> >> reg AI2 SI2
> >> est store b
> >> test( _cons=0) (SI2=1)
> >> local F2=r(F)
> >> local p2= r(p)
> >> reg AI3 SI3
> >> est store c
> >> test( _cons=0) (SI3=1)
> >> local F3=r(F)
> >> local p3= r(p)
> >> reg AI4 SI4
> >> est store d
> >> test( _cons=0) (SI4=1)
> >> local F4=r(F)
> >> local p4= r(p)
> >> reg AI5 SI5
> >> est store e
> >> test( _cons=0) (SI5=1)
> >> local F5=r(F)
> >> local p5= r(p)
> >>
> >> outreg2 [a b c d e] using 1test, stats (coef, tstat) addstat(Test 1
> >> F, `F1', Test 2 F, `F2' , Test 3 F, `F3', Test 4 F `F4', Test 5
> >> F`r(F)', `p1' `p2' `p3' `p4' `p5', `r(p)') bdec(3) tdec(2) pdec(3)
> tex
> >> replace
> >>
> >> I receive the error message invalid syntax, however, it works
> >> perfectly fine if I use only three regressions. Is this the maximum
> >> number of regressions that can I use?
> >>
> >> Thanks,
> >> Bea
> >> *
> >> * 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/
> >
> > --
> >
> =======================================================================
> =========
> > Dit bericht kan informatie bevatten die niet voor u is bestemd.
> Indien u
> > niet
> > de geadresseerde bent of dit bericht abusievelijk aan u is
> toegezonden,
> > wordt
> > u verzocht dat aan de afzender te melden en het bericht te
> verwijderen.
> > De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard
> ook,
> > die
> > verband houdt met risico's verbonden aan het elektronisch verzenden
> van
> > berichten.
> >
> > This message may contain information that is not intended for you. If
> you
> > are
> > not the addressee or if this message was sent to you by mistake, you
> are
> > requested to inform the sender and delete the message. The State
> accepts no
> > liability for damage of any kind resulting from the risks inherent in
> the
> > electronic transmission of messages.
> >
> =======================================================================
> =========
> >
> > *
> > * 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/
--
================================================================================
Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet
de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt
u verzocht dat aan de afzender te melden en het bericht te verwijderen.
De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die
verband houdt met risico's verbonden aan het elektronisch verzenden van
berichten.
This message may contain information that is not intended for you. If you are
not the addressee or if this message was sent to you by mistake, you are
requested to inform the sender and delete the message. The State accepts no
liability for damage of any kind resulting from the risks inherent in the
electronic transmission of messages.
================================================================================
*
* 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/