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

From |
Joly.Patrick@ic.gc.ca |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: RE: outreg & addstat |

Date |
Thu, 20 Feb 2003 16:23:53 -0500 |

Danielle H. Ferry > I am trying to add the results of 6 tests & their SE or > Prob>F to the table > created by outreg. I have been playing around w/ variations and cannot > figure out what is causing my funky results. > > This is my addstat option: > > addstat(Lincom test: waiver+(parity=1*waiver), est1, SE, se1, > Lincom test: > tanf+(parity=1*tanf), est2, SE, se2, F test: > popnLn*ttrend1=0, fstat1, Prob > > F, prob1, F test: popnLn*ttrend2=0, fstat2, Prob > F, prob2, F test: > state*popnLn*ttrend1=0, fstat3, Prob > F, prob3, F test: > state*popnLn*ttrend2=0, fstat4, Prob > F, prob4) > > What I get is this: > > Lincom test: waiver+(parity=1*waiver) 0.06 > SE 0.09 > Lincom test: tanf+(parity=1*tanf) 0.31 > SE 0.22 > F test: popnLn*ttrend1=0 0.35 > Prob > F 0.56 > F test: popnLn*ttrend2=0 0.10 > Prob > F 0.75 > F test: state*popnLn*ttrend1=0 37.12 > Lincom test: waiver+(parity=1*waiver) 0.06 > Lincom test: waiver+(parity=1*waiver) 0.06 > Lincom test: waiver+(parity=1*waiver) 0.06 > > If I leave out the last 2 tests, then everything looks fine. > Perhaps there > is a limit to the # of statistics that can be added? If so, > is there a way > around this? Any input? The problem arises because, with 10 or more statistics specified in addstat(), -outreg- tries to assign values to the macros named astnam10 astval10 astnam11 astval11 and so on. But since -outreg- is a version 6.0 program and macro names under Stata 6 could contain at most 7 characters, when trying to expand the above macros, Stata sees `astnam1' rather than `astnam10', `astnam11', `astnam12', etc. This explains why the name and values of your first additional statistic gets repeated 3 more times towards the end of the output. The solution is to replace the following macro names in -outreg-: astval by astva and macro name astnam by astna This can be easily done with a 'find' and 'replace' in a text editor. (I have checked and the names astva and astna don't appear anywhere else in code and so won't interfere with any other macro assignment.) If you also change the line program define outreg to program define outreg2 you can then save the file as outreg2.ado and run -outreg2- until John Gallup possibly updates his module. I will be emailing John separately, with additional comments, so he is aware of this. On a different note, some of you may notice I made a plea yesterday asking users to please report bugs of user-written commands directly to the author of a package rather than to the list. After reading Lee Sieswierda's reply, I realised that the approach I was advocating worked well for me since I tend to try to tackle the problem myself and email a possible solution to the author. However, for the researcher desperately awaiting a solution in order to continue their work, this wouldn't work so well. Getting timely advice is crucial and this is what the list is for. Apologies. Patrick Joly joly.patrick@ic.gc.ca pat.joly@utoronto.ca * * 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/

- Prev by Date:
**st: estimating parameters of Weibull distribution** - Next by Date:
**st: St: fonts in V8 graphs** - Previous by thread:
**st: estimating parameters of Weibull distribution** - Next by thread:
**st: St: fonts in V8 graphs** - Index(es):

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